Trait wca::CommandExt

source ·
pub trait CommandExt<T>: Sized {
    // Provided methods
    fn arg(self, hint: &str, tag: Type) -> Builder<Self> { ... }
    fn property<const N: usize>(
        self,
        name: impl ToString,
        hint: impl ToString,
        kind: Type
    ) -> Builder<Self> { ... }
    fn properties<const N: usize>(
        self,
        properties: [Property<'_>; N]
    ) -> Builder<Self> { ... }
}
Expand description

An extension trait for commands.

This trait provides additional methods for enhancing commands, such as adding arguments and properties.

Provided Methods§

source

fn arg(self, hint: &str, tag: Type) -> Builder<Self>

Adds an argument to the command.

source

fn property<const N: usize>( self, name: impl ToString, hint: impl ToString, kind: Type ) -> Builder<Self>

Adds property to the command.

source

fn properties<const N: usize>( self, properties: [Property<'_>; N] ) -> Builder<Self>

Adds properties to the command.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<F: Fn(T, Args, Props) -> Result<(), E>, T, E> CommandExt<T> for F