Struct wisp_mux::MuxStreamWrite
source · pub struct MuxStreamWrite<W>where
W: WebSocketWrite,{
pub stream_id: u32,
/* private fields */
}
Expand description
Write side of a multiplexor stream.
Fields§
§stream_id: u32
ID of the stream.
Implementations§
source§impl<W: WebSocketWrite + Send + 'static> MuxStreamWrite<W>
impl<W: WebSocketWrite + Send + 'static> MuxStreamWrite<W>
sourcepub fn get_close_handle(&self) -> MuxStreamCloser
pub fn get_close_handle(&self) -> MuxStreamCloser
Get a handle to close the connection.
Useful to close the connection without having access to the stream.
§Example
let handle = stream.get_close_handle();
if let Err(error) = handle_stream(stream) {
handle.close(0x01);
}
Trait Implementations§
source§impl<W: WebSocketWrite> Drop for MuxStreamWrite<W>
impl<W: WebSocketWrite> Drop for MuxStreamWrite<W>
Auto Trait Implementations§
impl<W> !RefUnwindSafe for MuxStreamWrite<W>
impl<W> Send for MuxStreamWrite<W>where
W: Send,
impl<W> Sync for MuxStreamWrite<W>where
W: Send,
impl<W> Unpin for MuxStreamWrite<W>
impl<W> !UnwindSafe for MuxStreamWrite<W>
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