pub struct WsIoServerConnection { /* private fields */ }Implementations§
Source§impl WsIoServerConnection
impl WsIoServerConnection
pub async fn disconnect(&self)
pub async fn emit<D: Serialize>( &self, event: impl AsRef<str>, data: Option<&D>, ) -> Result<()>
pub fn except( self: &Arc<Self>, room_names: impl IntoIterator<Item = impl Into<String>>, ) -> WsIoServerNamespaceBroadcastOperator
pub fn headers(&self) -> &HeaderMap
pub fn id(&self) -> u64
pub fn is_ready(&self) -> bool
pub fn join( self: &Arc<Self>, room_names: impl IntoIterator<Item = impl Into<String>>, )
pub fn leave( self: &Arc<Self>, room_names: impl IntoIterator<Item = impl Into<String>>, )
pub fn namespace(&self) -> Arc<WsIoServerNamespace>
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 async fn on_close<H, Fut>(&self, handler: H)
pub fn request_uri(&self) -> &Uri
pub fn server(&self) -> WsIoServer
pub fn to( self: &Arc<Self>, room_names: impl IntoIterator<Item = impl Into<String>>, ) -> WsIoServerNamespaceBroadcastOperator
Trait Implementations§
Source§impl TaskSpawner for WsIoServerConnection
impl TaskSpawner for WsIoServerConnection
fn cancel_token(&self) -> Arc<CancellationToken>
fn spawn_task<F>(&self, future: F)
Auto Trait Implementations§
impl !Freeze for WsIoServerConnection
impl !RefUnwindSafe for WsIoServerConnection
impl Send for WsIoServerConnection
impl Sync for WsIoServerConnection
impl Unpin for WsIoServerConnection
impl UnsafeUnpin for WsIoServerConnection
impl !UnwindSafe for WsIoServerConnection
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