pub enum TunnelTransportResult {
LocalPort {
port: u16,
forwarder: JoinHandle<()>,
},
Stream {
stream: Box<TunnelStream>,
},
}Expand description
Transport-specific resources returned alongside the SSH session.
Variants§
LocalPort
(a) Local TCP listener path. Point the existing driver at
127.0.0.1:port; forwarder pumps bytes between the
listener and a russh direct-tcpip channel.
Stream
(b) Direct stream path. Hand stream to a driver that
accepts a pre-built `AsyncRead + AsyncWrite + Unpin + Send
- ’static
(Postgres viaconnect_raw`).
Boxed so the enum’s variants stay roughly the same size —
TunnelStream wraps a russh::ChannelStream whose
internals (channels, JoinHandles) make it large compared
to the LocalPort variant.
Fields
§
stream: Box<TunnelStream>Auto Trait Implementations§
impl !RefUnwindSafe for TunnelTransportResult
impl !UnwindSafe for TunnelTransportResult
impl Freeze for TunnelTransportResult
impl Send for TunnelTransportResult
impl Sync for TunnelTransportResult
impl Unpin for TunnelTransportResult
impl UnsafeUnpin for TunnelTransportResult
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