pub struct ParamSpec {
pub name: &'static str,
pub slot_type: SlotType,
pub required: bool,
pub example: &'static str,
pub constraint: Option<ConstConstraint>,
}Expand description
Describes one parameter in a function’s call signature.
A “slot template” — the type-level version of a Slot without
a concrete value. Parameters are listed in positional order
matching the DSL syntax.
Fields§
§name: &'static strParameter name (for error messages and describe output).
slot_type: SlotTypeWire or constant, and if constant, what type.
required: boolWhether this parameter must be provided.
example: &'static strExample value for this parameter, used for probing compile
level and for documentation. Wire params use "cycle",
const params use a representative value that passes validation.
constraint: Option<ConstConstraint>Optional assembly-time validation rule (SRD 15 §“Const
Constraint Metadata”). The factory enforces this before
build_node so node constructors can stay infallible and
branch-free at runtime. None = no constraint declared
(default for wires and unconstrained constants).
Implementations§
Source§impl ParamSpec
impl ParamSpec
Sourcepub const fn with_constraint(self, c: ConstConstraint) -> Self
pub const fn with_constraint(self, c: ConstConstraint) -> Self
Convenience: chainable on a literal to attach a constraint. Used by node modules that want to keep the literal compact.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamSpec
impl RefUnwindSafe for ParamSpec
impl Send for ParamSpec
impl Sync for ParamSpec
impl Unpin for ParamSpec
impl UnsafeUnpin for ParamSpec
impl UnwindSafe for ParamSpec
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