Struct wisp_mux::MuxStreamWrite
source · pub struct MuxStreamWrite {
pub stream_id: u32,
pub stream_type: StreamType,
/* private fields */
}
Expand description
Write side of a multiplexor stream.
Fields§
§stream_id: u32
ID of the stream.
stream_type: StreamType
Type of the stream.
Implementations§
source§impl MuxStreamWrite
impl MuxStreamWrite
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);
}
sourcepub fn get_protocol_extension_stream(&self) -> MuxProtocolExtensionStream
pub fn get_protocol_extension_stream(&self) -> MuxProtocolExtensionStream
Get a protocol extension stream to send protocol extension packets.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MuxStreamWrite
impl !RefUnwindSafe for MuxStreamWrite
impl Send for MuxStreamWrite
impl Sync for MuxStreamWrite
impl Unpin for MuxStreamWrite
impl !UnwindSafe for MuxStreamWrite
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