pub enum ConstArg {
Int(u64),
Float(f64),
Str(String),
List(Vec<ConstArg>),
Opaque(Arc<dyn Any + Send + Sync>),
}Expand description
Constant arguments extracted from the AST.
Holds assembly-time values (integers, floats, strings, float arrays) that are baked into node constructors rather than passed as wire inputs.
pub visibility is required so that NodeRegistration::build function
pointers (which are pub fields) can name this type.
Variants§
Int(u64)
An integer literal.
Float(f64)
A float literal.
Str(String)
A string literal.
List(Vec<ConstArg>)
SRD-80b Phase C — workload-list const carrier for the
Const<Vec<C>> shape. Each inner ConstArg is one
element; the macro emits the walk over the list and the
per-element extraction for the element type it read out of
the signature.
Opaque(Arc<dyn Any + Send + Sync>)
A value the compiler built and hands the node as it is.
The other variants are what a literal in the source parses to.
This one is for what the compiler makes: a tile’s skeleton with
its projection bodies already lowered, for instance. It used to
travel as a Str holding JSON, which the node parsed back —
so a malformed payload was a panic at node construction rather
than a compile error, the body’s source lived in three places,
and everything the compiler knew that JSON cannot carry was
lost on the way.
The receiving node names the concrete type, which
ConstArg::as_opaque downcasts to.
Implementations§
Source§impl ConstArg
impl ConstArg
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ConstArg
impl !UnwindSafe for ConstArg
impl Freeze for ConstArg
impl Send for ConstArg
impl Sync for ConstArg
impl Unpin for ConstArg
impl UnsafeUnpin for ConstArg
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
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> ⓘ
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> ⓘ
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