Struct WebSocket

Source
pub struct WebSocket { /* private fields */ }

Implementations§

Source§

impl WebSocket

Source

pub fn new() -> Self

Source

pub fn receiver_count<'a, B: BroadcastTypeTrait>( &self, broadcast_type: BroadcastType<B>, ) -> ReceiverCount

Source

pub fn receiver_count_after_increment<B: BroadcastTypeTrait>( &self, broadcast_type: BroadcastType<B>, ) -> ReceiverCount

Source

pub fn receiver_count_after_decrement<B: BroadcastTypeTrait>( &self, broadcast_type: BroadcastType<B>, ) -> ReceiverCount

Source

pub fn send<T, B>( &self, broadcast_type: BroadcastType<B>, data: T, ) -> BroadcastMapSendResult<Vec<u8>>
where T: Into<Vec<u8>>, B: BroadcastTypeTrait,

Source

pub async fn run<'a, F1, Fut1, F2, Fut2, F3, Fut3, B>( &self, ctx: &Context, buffer_size: usize, broadcast_type: BroadcastType<B>, request_handler: F1, on_sended: F2, on_client_closed: F3, )
where F1: FnSendSyncStatic<Fut1>, Fut1: FutureSendStatic, F2: FnSendSyncStatic<Fut2>, Fut2: FutureSendStatic, F3: FnSendSyncStatic<Fut3>, Fut3: FutureSendStatic, B: BroadcastTypeTrait,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> AnySend for T
where T: Any + Send,

Source§

impl<T> AnySendSync for T
where T: Any + Send + Sync,

Source§

impl<T> AnySync for T
where T: Any + Sync,

Source§

impl<T> ErasedDestructor for T
where T: 'static,