diff --git a/node-graph/libraries/core-types/src/record/input.rs b/node-graph/libraries/core-types/src/record/input.rs index 11e150e8d1..a5da11d038 100644 --- a/node-graph/libraries/core-types/src/record/input.rs +++ b/node-graph/libraries/core-types/src/record/input.rs @@ -216,7 +216,7 @@ unsafe fn element_only(rec: Rec<'_>, _reads: &[Option]) -> El unsafe { read_element::(rec) } } -pub struct ElementEdge<'a, 'e, Out, N> { +pub struct ElementInput<'a, 'e, Out, N> { node: &'a N, layout: &'a Layout, reads: &'a [Option], @@ -224,7 +224,7 @@ pub struct ElementEdge<'a, 'e, Out, N> { frames: &'a Frames<'e>, } -impl<'a, 'e, El: Clone, N> ElementEdge<'a, 'e, El, N> { +impl<'a, 'e, El: Clone, N> ElementInput<'a, 'e, El, N> { pub fn new(node: &'a N, layout: &'a Layout, frames: &'a Frames<'e>) -> Self { Self { node, @@ -236,7 +236,7 @@ impl<'a, 'e, El: Clone, N> ElementEdge<'a, 'e, El, N> { } } -impl<'a, 'e, Out, N> ElementEdge<'a, 'e, Out, N> { +impl<'a, 'e, Out, N> ElementInput<'a, 'e, Out, N> { /// `read` must be sound against the layout the offsets in `reads` were /// resolved from; the macro proves both at wiring. pub fn with_reads(node: &'a N, layout: &'a Layout, reads: &'a [Option], read: unsafe fn(Rec<'_>, &[Option]) -> Out, frames: &'a Frames<'e>) -> Self { diff --git a/node-graph/libraries/core-types/src/record/mod.rs b/node-graph/libraries/core-types/src/record/mod.rs index 536b9af91f..80c7060665 100644 --- a/node-graph/libraries/core-types/src/record/mod.rs +++ b/node-graph/libraries/core-types/src/record/mod.rs @@ -23,7 +23,7 @@ mod testkit; pub use access::{Rec, RecordValue, apply_plan, borrow_element, erase_static, read_at, read_element, token_only, write_element, write_element_sized, write_field}; pub use frames::{FrameArena, FrameScope, Frames}; -pub use input::{DerivedLazyInput, DerivedRecordInput, ElementEdge, ElementLazyInput, LevelStatus, RecordExtract, RecordInput, RecordLazyInput, fill_frames, materialize_batch, materialize_level}; +pub use input::{DerivedLazyInput, DerivedRecordInput, ElementInput, ElementLazyInput, LevelStatus, RecordExtract, RecordInput, RecordLazyInput, fill_frames, materialize_batch, materialize_level}; pub use layout::{ ElToken, ElementSpec, ElementWrite, ElementWritePick, ElementWritePickHashed, ElementWritePickPlain, FieldDesc, FieldOffset, FieldWrite, InputReads, Layout, LayoutMeta, RecordLayout, copy_plan, element_dims, element_parked, element_write, element_write_hashed, empty_layout, diff --git a/node-graph/node-macro/src/codegen.rs b/node-graph/node-macro/src/codegen.rs index 288f8740d8..4d107b0678 100644 --- a/node-graph/node-macro/src/codegen.rs +++ b/node-graph/node-macro/src/codegen.rs @@ -1135,7 +1135,7 @@ pub(crate) fn generate_node_impl(crate_ident: &CrateIdent, parsed: &ParsedNodeFn (LazyBinding::OpaqueRecord, _) => quote!(#pat: &#core_types::record::RecordInput<'_, #frames_lifetime, #source_generic>), (LazyBinding::Element, true) => { let out = lazy_read_out(field, output_type); - quote!(#pat: &#core_types::record::ElementEdge<'_, #frames_lifetime, #out, #source_generic>) + quote!(#pat: &#core_types::record::ElementInput<'_, #frames_lifetime, #out, #source_generic>) } (LazyBinding::Element, false) => { let out = lazy_read_out(field, output_type); @@ -1457,13 +1457,13 @@ pub(crate) fn generate_node_impl(crate_ident: &CrateIdent, parsed: &ParsedNodeFn let slot = format_ident!("__in_{index}"); match field.attribute_reads.is_empty() { true => quote! { - let #name = #core_types::record::ElementEdge::<#output_type, _>::new(&self.#name, &self.#slot, &__lazy_frames); + let #name = #core_types::record::ElementInput::<#output_type, _>::new(&self.#name, &self.#slot, &__lazy_frames); }, false => { let arr = format_ident!("__reads_{index}"); let read_fn = format_ident!("__{}_read_{}", fn_name, index); quote! { - let #name = #core_types::record::ElementEdge::with_reads(&self.#name, &self.#slot, &self.#arr, self::#read_fn, &__lazy_frames); + let #name = #core_types::record::ElementInput::with_reads(&self.#name, &self.#slot, &self.#arr, self::#read_fn, &__lazy_frames); } } }