Skip to main content

Command

Trait Command 

Source
pub trait Command:
    Send
    + Sync
    + 'static {
    type Arguments: JsonSchema + DeserializeOwned + LLMSafe + Send + Sync + 'static;

    const NAME: &'static str;

    // Required method
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        args: Self::Arguments,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Constants§

Source

const NAME: &'static str

Required Associated Types§

Required Methods§

Source

fn execute<'life0, 'async_trait>( &'life0 self, args: Self::Arguments, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§