Trait SharedWsApiTrait

Source
pub trait SharedWsApiTrait<WsApiId: Hash + Eq + Clone + Debug, Payload: SharedWsApiPayloadTrait<WsApiId>, Response: SharedWsResponseTrait<WsApiId> + Debug>
where Self: Sized + ClientExt,
{ // Required methods fn get_client(&self) -> &Client<Self>; fn get_oneshot_tx_map( &mut self, ) -> &mut HashMap<WsApiId, Sender<Result<Response, SharedWsError>>>; // Provided methods fn send_oneshot( &mut self, payload: Payload, tx: Sender<Result<Response, SharedWsError>>, ) -> Result<(), SharedWsError> { ... } fn recv_oneshot_resp( &mut self, text: &str, ) -> Option<Result<(), SharedWsError>> { ... } }

Required Methods§

Source

fn get_client(&self) -> &Client<Self>

Source

fn get_oneshot_tx_map( &mut self, ) -> &mut HashMap<WsApiId, Sender<Result<Response, SharedWsError>>>

Provided Methods§

Source

fn send_oneshot( &mut self, payload: Payload, tx: Sender<Result<Response, SharedWsError>>, ) -> Result<(), SharedWsError>

Source

fn recv_oneshot_resp(&mut self, text: &str) -> Option<Result<(), SharedWsError>>

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§