pub struct InputSpec {
pub name: &'static str,
pub ty: Type,
pub required: bool,
pub default: Option<Value>,
pub description: &'static str,
}Expand description
A single declared input on an OperationMetadata.
Fields§
§name: &'static strThe input’s name — used as the lookup key for
Context::input.
ty: TypeThe expected type. Use Type::Any to opt out of type
checking.
required: boolWhether the input must be supplied by the caller. If false
and absent, the operation is expected to supply its own fallback
via default or custom logic.
default: Option<Value>An optional fallback value used when the input is absent.
description: &'static strA human-readable description of the input’s role.
Trait Implementations§
impl StructuralPartialEq for InputSpec
Auto Trait Implementations§
impl Freeze for InputSpec
impl RefUnwindSafe for InputSpec
impl Send for InputSpec
impl Sync for InputSpec
impl Unpin for InputSpec
impl UnsafeUnpin for InputSpec
impl UnwindSafe for InputSpec
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