Client

Trait Client 

Source
pub trait Client:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn rerun_query(&self, query_key: u64);
    fn push_result<R>(&self, query_key: u64, result: ExchangeResult<R>)
       where R: DeserializeOwned + Send + Sync + Clone + 'static;
}
Expand description

Client trait passed to exchanges. Only exposes methods useful to exchanges

Required Methods§

Source

fn rerun_query(&self, query_key: u64)

Rerun a query with that key and push the result to all subscribers.

Source

fn push_result<R>(&self, query_key: u64, result: ExchangeResult<R>)
where R: DeserializeOwned + Send + Sync + Clone + 'static,

Push a new result to any subscribers.

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.

Implementations on Foreign Types§

Source§

impl<M: Exchange> Client for Arc<ClientImpl<M>>

Source§

fn rerun_query(&self, query_key: u64)

Source§

fn push_result<R>(&self, key: u64, result: ExchangeResult<R>)
where R: DeserializeOwned + Send + Sync + Clone + 'static,

Implementors§