pub struct CommandArg {
pub name: String,
pub type_name: String,
pub required: bool,
pub schema: Option<Value>,
}Expand description
Schema for a single argument of a registered command.
Fields§
§name: StringArgument name as declared in the Rust function signature.
type_name: StringRust type name (e.g. “String”, “Option<u32>”).
required: boolWhether the argument must be provided (not Option).
schema: Option<Value>Optional JSON Schema for the argument’s expected shape.
Trait Implementations§
Source§impl Clone for CommandArg
impl Clone for CommandArg
Source§fn clone(&self) -> CommandArg
fn clone(&self) -> CommandArg
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandArg
impl Debug for CommandArg
Source§impl<'de> Deserialize<'de> for CommandArg
impl<'de> Deserialize<'de> for CommandArg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CommandArg
impl PartialEq for CommandArg
Source§fn eq(&self, other: &CommandArg) -> bool
fn eq(&self, other: &CommandArg) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CommandArg
impl Serialize for CommandArg
impl Eq for CommandArg
impl StructuralPartialEq for CommandArg
Auto Trait Implementations§
impl Freeze for CommandArg
impl RefUnwindSafe for CommandArg
impl Send for CommandArg
impl Sync for CommandArg
impl Unpin for CommandArg
impl UnsafeUnpin for CommandArg
impl UnwindSafe for CommandArg
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