pub struct WsIoClient(/* private fields */);Implementations§
Source§impl WsIoClient
 
impl WsIoClient
pub fn builder<U>(url: U) -> Result<WsIoClientBuilder>
pub fn cancel_token(&self) -> Arc<CancellationToken>
pub async fn connect(&self)
pub async fn disconnect(&self)
pub async fn emit<D: Serialize>( &self, event: impl AsRef<str>, data: Option<&D>, ) -> Result<()>
pub fn off(&self, event: impl AsRef<str>)
pub fn off_by_handler_id(&self, event: impl AsRef<str>, handler_id: u32)
pub fn on<H, Fut, D>(&self, event: impl AsRef<str>, handler: H) -> u32
pub fn spawn_task<F: Future<Output = Result<()>> + Send + 'static>( &self, future: F, )
Trait Implementations§
Source§impl Clone for WsIoClient
 
impl Clone for WsIoClient
Source§fn clone(&self) -> WsIoClient
 
fn clone(&self) -> WsIoClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreAuto Trait Implementations§
impl Freeze for WsIoClient
impl !RefUnwindSafe for WsIoClient
impl Send for WsIoClient
impl Sync for WsIoClient
impl Unpin for WsIoClient
impl !UnwindSafe for WsIoClient
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