Trait Command

Source
pub trait Command {
    type Output: DeserializeOwned;

    // Required methods
    fn as_cmd(&self) -> &ReCmd;
    fn client(&self) -> &Client;
    fn url(&self) -> &Url;
    fn set_options<S: Serialize>(&mut self, opt: S) -> Result<&mut Self>;

    // Provided methods
    fn set_options_with_arg<S: Serialize>(
        &mut self,
        key: S,
        value: S,
    ) -> Result<&mut Self> { ... }
    fn send<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<ReResponse<Self::Output>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Associated Types§

Required Methods§

Source

fn as_cmd(&self) -> &ReCmd

Source

fn client(&self) -> &Client

Source

fn url(&self) -> &Url

Source

fn set_options<S: Serialize>(&mut self, opt: S) -> Result<&mut Self>

Provided Methods§

Source

fn set_options_with_arg<S: Serialize>( &mut self, key: S, value: S, ) -> Result<&mut Self>

Source

fn send<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ReResponse<Self::Output>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§