pub struct FuncParam {
pub name: String,
pub param_type: Option<TypeTag>,
pub allowed: Option<&'static [&'static str]>,
pub docs: &'static str,
pub options: Option<&'static [ParamOption]>,
pub optional: bool,
}Expand description
One declared parameter of a registered function. param_type is None
for unconstrained Value parameters (the macro accepts any value).
allowed names the closed value set for constrained STRING
parameters, declared once via #[values(...)]: the generated
extractor enforces membership and the reference renders the set,
so the list cannot rot apart from the check. docs carries the
parameter’s description (parsed from the # Arguments doc section
for macro functions, written inline for hand-built entries) and
renders into every reference surface. options declares the known
keys of a MAP options parameter: same single-source rule as
allowed, with per-key types, required flags, defaults, and docs.
optional marks a trailing MAP parameter callers may omit: the
runtime fills an empty MAP, and signatures render = {}. Only
trailing MAP params may be optional (run-start validation
rejects anything else), so omission always means “no options”.
The macro never emits optional params: only hand-built entries
use them, and only for options MAPs.
Fields§
§name: String§param_type: Option<TypeTag>§allowed: Option<&'static [&'static str]>§docs: &'static str§options: Option<&'static [ParamOption]>§optional: boolTrait Implementations§
Auto Trait Implementations§
impl Forget for FuncParam
impl Freeze for FuncParamwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<TypeTag> is !null: Freeze,
PhantomData<ArcInner<TypeTag>>: Freeze,
&'static TypeDescriptor: Freeze,
*const ArcInner<[Field]> is !null: Freeze,
PhantomData<ArcInner<[Field]>>: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<[TypeTag]> is !null: Freeze,
PhantomData<ArcInner<[TypeTag]>>: Freeze,
&'static [&'static str]: Freeze,
&'static str: Freeze,
&'static [ParamOption]: Freeze,
impl Move for FuncParam
impl RefUnwindSafe for FuncParam
impl Send for FuncParam
impl Sync for FuncParam
impl Unpin for FuncParam
impl UnsafeUnpin for FuncParamwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<TypeTag> is !null: UnsafeUnpin,
PhantomData<ArcInner<TypeTag>>: UnsafeUnpin,
&'static TypeDescriptor: UnsafeUnpin,
*const ArcInner<[Field]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[Field]>>: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<[TypeTag]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[TypeTag]>>: UnsafeUnpin,
&'static [&'static str]: UnsafeUnpin,
&'static str: UnsafeUnpin,
&'static [ParamOption]: UnsafeUnpin,
impl UnwindSafe for FuncParamwhere
RawVecInner: UnwindSafe,
Arc<TypeTag>: UnwindSafe,
&'static TypeDescriptor: UnwindSafe,
Arc<[Field]>: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<[TypeTag]>: UnwindSafe,
&'static [&'static str]: UnwindSafe,
&'static str: UnwindSafe,
&'static [ParamOption]: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.