xtb_client

Trait XtbConnection

Source
pub trait XtbConnection {
    type Error;
    type Response: Future<Output = Result<ProcessedMessage, BasicXtbConnectionError>>;

    // Required method
    fn send_command<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        command: &'life1 str,
        payload: Option<Value>,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Interface for XTB servers connectors.

Required Associated Types§

Source

type Error

Source

type Response: Future<Output = Result<ProcessedMessage, BasicXtbConnectionError>>

Required Methods§

Source

fn send_command<'life0, 'life1, 'async_trait>( &'life0 mut self, command: &'life1 str, payload: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Send standard command to the server.

Implementors§