pub trait SharedWsApiTrait<WsApiId: Hash + Eq + Clone + Debug, Payload: SharedWsApiPayloadTrait<WsApiId>, Response: SharedWsResponseTrait<WsApiId> + Debug>{
// 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§
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>>
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.