pub struct BnWsApi { /* private fields */ }Implementations§
Trait Implementations§
Source§impl ClientExt for BnWsApi
impl ClientExt for BnWsApi
Source§type Call = BnWsApiCall
type Call = BnWsApiCall
Type the custom call - parameters passed to
on_call.Source§fn on_text<'life0, 'async_trait>(
&'life0 mut self,
text: Utf8Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_text<'life0, 'async_trait>(
&'life0 mut self,
text: Utf8Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for text messages from the server. Read more
Source§fn on_binary<'life0, 'async_trait>(
&'life0 mut self,
_bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_binary<'life0, 'async_trait>(
&'life0 mut self,
_bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for binary messages from the server. Read more
Source§fn on_call<'life0, 'async_trait>(
&'life0 mut self,
call: Self::Call,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_call<'life0, 'async_trait>(
&'life0 mut self,
call: Self::Call,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for custom calls from other parts from your program. Read more
Source§fn on_connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called when the client successfully connected (or reconnected). Read more
Source§fn on_connect_fail<'life0, 'async_trait>(
&'life0 mut self,
_error: Error,
) -> Pin<Box<dyn Future<Output = Result<ClientCloseMode, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn on_connect_fail<'life0, 'async_trait>(
&'life0 mut self,
_error: Error,
) -> Pin<Box<dyn Future<Output = Result<ClientCloseMode, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Called when the client fails a connection/reconnection attempt. Read more
Source§fn on_close<'life0, 'async_trait>(
&'life0 mut self,
_frame: Option<CloseFrame>,
) -> Pin<Box<dyn Future<Output = Result<ClientCloseMode, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn on_close<'life0, 'async_trait>(
&'life0 mut self,
_frame: Option<CloseFrame>,
) -> Pin<Box<dyn Future<Output = Result<ClientCloseMode, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Called when the connection is closed by the server. Read more
fn get_client(&self) -> &Client<Self>
fn get_oneshot_tx_map( &mut self, ) -> &mut HashMap<String, Sender<Result<BnWsApiResponse, SharedWsError>>>
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>>
Auto Trait Implementations§
impl Freeze for BnWsApi
impl !RefUnwindSafe for BnWsApi
impl Send for BnWsApi
impl Sync for BnWsApi
impl Unpin for BnWsApi
impl !UnwindSafe for BnWsApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more