pub struct Exchange<'a, S: Stream, C: SansIo> { /* private fields */ }Expand description
Dropping an unfinished operation aborts both its protocol and transport.
Implementations§
Methods from Deref<Target = Driver<S, C>>§
pub fn core(&self) -> &C
pub fn core_mut(&mut self) -> &mut C
pub fn is_connected(&self) -> bool
pub fn stream(&self) -> Option<&S>
Sourcepub fn abort(&mut self)
pub fn abort(&mut self)
Close immediately. Submitted transport storage remains owned by AsyncIo.
Sourcepub fn replace_stream(&mut self, stream: S) -> Result<()>
pub fn replace_stream(&mut self, stream: S) -> Result<()>
Install a new transport after the protocol has entered its reconnect state. Bytes from the failed transport are never fed to the new session.
Sourcepub fn exchange(&mut self) -> Exchange<'_, S, C>
pub fn exchange(&mut self) -> Exchange<'_, S, C>
Guard a complete operation, including pauses between protocol events.
Sourcepub fn upgrade_stream(&mut self) -> Result<&mut S>
pub fn upgrade_stream(&mut self) -> Result<&mut S>
A TLS transition is legal only at a drained plaintext boundary.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S, C> !UnwindSafe for Exchange<'a, S, C>
impl<'a, S, C> Forget for Exchange<'a, S, C>
impl<'a, S, C> Freeze for Exchange<'a, S, C>
impl<'a, S, C> RefUnwindSafe for Exchange<'a, S, C>where
&'a mut Driver<S, C>: RefUnwindSafe,
impl<'a, S, C> Send for Exchange<'a, S, C>
impl<'a, S, C> Sync for Exchange<'a, S, C>
impl<'a, S, C> Unpin for Exchange<'a, S, C>
impl<'a, S, C> UnsafeUnpin for Exchange<'a, S, C>where
&'a mut Driver<S, C>: UnsafeUnpin,
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