pub struct NodeMeta {
pub name: String,
pub ins: Vec<Slot>,
pub outs: Vec<Port>,
}Expand description
Metadata describing a node’s interface: its input slots and output ports.
Generated per-node-type and queryable at runtime for assembly-time validation, compilation, optimization passes, and describe output.
Wire inputs are Slot::Wire(Port). Constants are Slot::Const { name, value }.
Use wire_inputs() to extract just the wire ports.
Fields§
§name: StringThe node’s function name, as programs call it.
ins: Vec<Slot>All inputs in positional order: wires and constants.
outs: Vec<Port>The output ports, in positional order.
Implementations§
Source§impl NodeMeta
impl NodeMeta
Sourcepub fn wire_inputs(&self) -> Vec<&Port>
pub fn wire_inputs(&self) -> Vec<&Port>
Wire-only input ports extracted from ins.
Sourcepub fn const_slots(&self) -> Vec<(&str, &ConstValue)>
pub fn const_slots(&self) -> Vec<(&str, &ConstValue)>
Constant names and values extracted from ins.
Sourcepub fn jit_constants_from_slots(&self) -> Vec<u64>
pub fn jit_constants_from_slots(&self) -> Vec<u64>
Encode all constants from ins to JIT u64 representation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeMeta
impl RefUnwindSafe for NodeMeta
impl Send for NodeMeta
impl Sync for NodeMeta
impl Unpin for NodeMeta
impl UnsafeUnpin for NodeMeta
impl UnwindSafe for NodeMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more