pub struct CommandNode {
pub name: String,
pub aliases: Vec<String>,
pub doc: Doc,
pub globals: Globals,
pub subcommands: Vec<CommandIndex>,
pub body: Option<CommandBody>,
}Expand description
A node in the command tree. May dispatch to subcommands, run its own body, or both. Globals declared here apply to this command’s own body and to every descendant subcommand body.
Fields§
§name: String§aliases: Vec<String>§doc: Doc§globals: Globals§subcommands: Vec<CommandIndex>§body: Option<CommandBody>Trait Implementations§
Source§impl Clone for CommandNode
impl Clone for CommandNode
Source§fn clone(&self) -> CommandNode
fn clone(&self) -> CommandNode
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 CommandNode
impl Debug for CommandNode
Source§impl<'de> Deserialize<'de> for CommandNode
impl<'de> Deserialize<'de> for CommandNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommandNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommandNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromSchema for CommandNode
impl FromSchema for CommandNode
fn from_value(value: &SchemaValue) -> Result<CommandNode, FromSchemaError>
Source§impl IntoSchema for CommandNode
impl IntoSchema for CommandNode
fn type_id() -> TypeId
fn register_in(builder: &mut SchemaBuilder) -> SchemaType
fn to_value(&self) -> SchemaValue
Source§impl PartialEq for CommandNode
impl PartialEq for CommandNode
Source§impl Serialize for CommandNode
impl Serialize for CommandNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CommandNode
Auto Trait Implementations§
impl Freeze for CommandNode
impl RefUnwindSafe for CommandNode
impl Send for CommandNode
impl Sync for CommandNode
impl Unpin for CommandNode
impl UnsafeUnpin for CommandNode
impl UnwindSafe for CommandNode
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