pub struct Handle { /* private fields */ }
Expand description
Handle to a session, used to send messages to a client outside of the request/response cycle.
Implementations§
source§impl Handle
impl Handle
sourcepub async fn data(
&mut self,
id: ChannelId,
data: CryptoVec
) -> Result<(), CryptoVec>
pub async fn data( &mut self, id: ChannelId, data: CryptoVec ) -> Result<(), CryptoVec>
Send data to the session referenced by this handler.
sourcepub async fn extended_data(
&mut self,
id: ChannelId,
ext: u32,
data: CryptoVec
) -> Result<(), CryptoVec>
pub async fn extended_data( &mut self, id: ChannelId, ext: u32, data: CryptoVec ) -> Result<(), CryptoVec>
Send data to the session referenced by this handler.
sourcepub async fn eof(&mut self, id: ChannelId) -> Result<(), ()>
pub async fn eof(&mut self, id: ChannelId) -> Result<(), ()>
Send EOF to the session referenced by this handler.
sourcepub async fn xon_xoff_request(
&mut self,
id: ChannelId,
client_can_do: bool
) -> Result<(), ()>
pub async fn xon_xoff_request( &mut self, id: ChannelId, client_can_do: bool ) -> Result<(), ()>
Inform the client of whether they may perform control-S/control-Q flow control. See RFC4254.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl !UnwindSafe for Handle
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