pub struct TunnelHandle {
pub session: SshSession,
pub transport: TunnelTransportResult,
}Expand description
Outcome of setup_tunnel. The session is held alongside
the transport-specific resources so callers only need to
keep one value alive — when TunnelHandle drops, the SSH
session and (for path a) the forwarder task drop with it.
SshSession is hoisted out of TunnelTransport (which
would otherwise carry it in both variants) to keep the
transport enum’s variants small — russh::client::Handle
is hundreds of bytes and would trip
clippy::large_enum_variant if duplicated per variant.
Fields§
§session: SshSession§transport: TunnelTransportResultAuto Trait Implementations§
impl !RefUnwindSafe for TunnelHandle
impl !UnwindSafe for TunnelHandle
impl Freeze for TunnelHandle
impl Send for TunnelHandle
impl Sync for TunnelHandle
impl Unpin for TunnelHandle
impl UnsafeUnpin for TunnelHandle
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