Skip to main content

SubcommandDefinition

Trait SubcommandDefinition 

Source
pub trait SubcommandDefinition: CommandDefinition {
    const DEPTH: u8;

    // Required method
    fn option_definition() -> ApplicationCommandOption;
}
Expand description

A chat-input Command or Group that can be nested in a Group.

Required Associated Constants§

Source

const DEPTH: u8

0 for a Command, 1 for a Group of Commands, 2 for a Group containing Groups

Required Methods§

Source

fn option_definition() -> ApplicationCommandOption

This Command as a subcommand, or this Group as a subcommand group

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§