pub struct WebSocketServer<M> { /* private fields */ }Implementations§
Source§impl<M> Server<M>where
M: Clone,
impl<M> Server<M>where
M: Clone,
pub fn new(cfg: &Config) -> Self
pub async fn stop(&self) -> Result<(), SendError<()>>
pub fn with_message_handler<F, Fut>(self, h: F) -> Self
pub fn with_error_handler<F, Fut>(self, h: F) -> Self
pub async fn broadcast(&self, msg: M) -> Result<usize, SendError<M>>
pub async fn handle_stream<S, E>(&self, s: S)
Trait Implementations§
Auto Trait Implementations§
impl<M> !RefUnwindSafe for Server<M>
impl<M> !UnwindSafe for Server<M>
impl<M> Freeze for Server<M>
impl<M> Send for Server<M>where
M: Send,
impl<M> Sync for Server<M>where
M: Send,
impl<M> Unpin for Server<M>
impl<M> UnsafeUnpin for Server<M>
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