pub struct TunneledConnection { /* private fields */ }Expand description
Wraps a backend AsyncConnection (the crate-private async driver
trait) plus the
SSH session (and, for the LocalListener transport, the
forwarder task) so the entire stack drops together.
Why this is non-generic: the connect dispatcher returns
Box<dyn AsyncConnection> regardless of backend, so an outer
wrapper that already holds the inner as Box<dyn AsyncConnection> saves us from adding a blanket impl<C: AsyncConnection> AsyncConnection for TunneledConnection<C> and
the matching impl<C> AsyncConnection for Box<C> (which
async_trait doesn’t synthesize).
Auto Trait Implementations§
impl !RefUnwindSafe for TunneledConnection
impl !Sync for TunneledConnection
impl !UnwindSafe for TunneledConnection
impl Freeze for TunneledConnection
impl Send for TunneledConnection
impl Unpin for TunneledConnection
impl UnsafeUnpin for TunneledConnection
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