pub enum Tunnel {
Bidi {
client: Box<dyn AsyncReadWrite + Send>,
upstream: Box<dyn AsyncReadWrite + Send>,
close_reason_tx: Option<Sender<CloseReason>>,
},
Udp(UdpTunnel),
}Expand description
Bridge between the executor’s ByteTunnel arm and a fetch’s chosen
transport. Bidi is the stream-pair shape that
tokio::io::copy_bidirectional consumes — covers TCP forward, TLS
passthrough, and the H1 WebSocket post-upgrade path. Udp is the
session-driven shape: the fetch has already spawned the per-5-tuple
forwarder task; the executor’s role degenerates to awaiting
join so ConnContext cleanup runs at the right moment.
See spec/architecture/06-l4.md § udp_dispatch for the UDP
session lifecycle and § l4_forward for the TCP arm.
Variants§
Bidi
Fields
§
client: Box<dyn AsyncReadWrite + Send>§
upstream: Box<dyn AsyncReadWrite + Send>§
close_reason_tx: Option<Sender<CloseReason>>Udp(UdpTunnel)
Auto Trait Implementations§
impl Freeze for Tunnel
impl !RefUnwindSafe for Tunnel
impl Send for Tunnel
impl !Sync for Tunnel
impl Unpin for Tunnel
impl UnsafeUnpin for Tunnel
impl !UnwindSafe for Tunnel
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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