Struct tide_websockets_ext::websocket_state::WebSocketState [−][src]
pub struct WebSocketState(_);
Expand description
WebSocketState
Implementations
Insert a WebSocketConnection
Remove a WebSocketConnection
pub async fn send_string(
&self,
msg: String,
handle: WebSocketHandle,
timeout: Duration
) -> Result<()>
pub async fn send_string(
&self,
msg: String,
handle: WebSocketHandle,
timeout: Duration
) -> Result<()>
Send a String
to a particular client
Send a type with T: Serialize as json
pub async fn send_bytes(
&self,
bytes: Vec<u8>,
handle: WebSocketHandle,
timeout: Duration
) -> Result<()>
pub async fn send_bytes(
&self,
bytes: Vec<u8>,
handle: WebSocketHandle,
timeout: Duration
) -> Result<()>
Send bytes
Send a websockets Message
.
Send every client a String
.
Send every client a T: Serialize as JSON.
Send every client a Message
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for WebSocketState
impl Send for WebSocketState
impl Sync for WebSocketState
impl Unpin for WebSocketState
impl !UnwindSafe for WebSocketState
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V