Struct ConnectUdpTunnel
pub struct ConnectUdpTunnel<I = TunnelDatagramSocket> { /* private fields */ }masque only.Expand description
An accepted CONNECT-UDP tunnel that still owns its original HTTP events.
A datagram peeker can read its ingress. Consume the tunnel to either resume
forwarding its original events or serve ordinary context-zero UDP. Dropping
it without selecting either path closes the accepted tunnel. During a
peek the socket is receive-only. Self::into_datagrams enables sending
on both UDP legs, including senders acquired before the decision.
Implementations§
§impl<I> ConnectUdpTunnel<I>
impl<I> ConnectUdpTunnel<I>
pub fn forward(self)
pub fn forward(self)
Forward the retained first flight and all following events through the existing HTTP relay. Completion and errors belong to the enclosing relay.
pub fn into_datagrams(
self,
) -> Bridge<MessageIo<I>, MessageIo<TunnelDatagramSocket>>
pub fn into_datagrams( self, ) -> Bridge<MessageIo<I>, MessageIo<TunnelDatagramSocket>>
Hand context-zero traffic to an ordinary UDP service. A peeker’s prefix stays on ingress. The outer relay continues to forward other contexts and private control capsules in both directions.
§impl<I> ConnectUdpTunnel<I>where
I: ExtensionsRef,
impl<I> ConnectUdpTunnel<I>where
I: ExtensionsRef,
pub fn target_hint(&self) -> Option<&ConnectUdpTargetHint>
pub fn target_hint(&self) -> Option<&ConnectUdpTargetHint>
Optional URI-derived metadata, including the evidence for an inferred target.
pub fn target(&self) -> Option<&ConnectUdpTarget>
pub fn target(&self) -> Option<&ConnectUdpTarget>
The original hostname or IP and port, when supplied by the request matcher.
See super::ConnectUdpRelayRequestMatcher::with_target_extraction.
Trait Implementations§
§impl<I> DatagramPeekInput for ConnectUdpTunnel<I>where
I: Send + 'static,
impl<I> DatagramPeekInput for ConnectUdpTunnel<I>where
I: Send + 'static,
§type Mapped<P: Send + 'static> = ConnectUdpTunnel<P>
type Mapped<P: Send + 'static> = ConnectUdpTunnel<P>
PrefixedDatagramSocket.§fn peek_socket_mut(&mut self) -> &mut I
fn peek_socket_mut(&mut self) -> &mut I
§fn into_peek_socket(self) -> I
fn into_peek_socket(self) -> I
§fn map_peek_socket<P, F>(
self,
map: F,
) -> <ConnectUdpTunnel<I> as DatagramPeekInput>::Mapped<P>
fn map_peek_socket<P, F>( self, map: F, ) -> <ConnectUdpTunnel<I> as DatagramPeekInput>::Mapped<P>
map’s result for its peeked socket.§impl<I> ExtensionsRef for ConnectUdpTunnel<I>
impl<I> ExtensionsRef for ConnectUdpTunnel<I>
§fn extensions(&self) -> &Extensions
fn extensions(&self) -> &Extensions
Extensions storeAuto Trait Implementations§
impl<I = TunnelDatagramSocket> !RefUnwindSafe for ConnectUdpTunnel<I>
impl<I = TunnelDatagramSocket> !UnwindSafe for ConnectUdpTunnel<I>
impl<I> Forget for ConnectUdpTunnel<I>
impl<I> Freeze for ConnectUdpTunnel<I>where
I: Freeze,
*const ArcInner<Chan<Bytes, Semaphore>> is !null: Freeze,
PhantomData<ArcInner<Chan<Bytes, Semaphore>>>: Freeze,
*const dyn Future<Output = Result<OwnedPermit<Bytes>, PollSendError<Bytes>>> + Send is !null: Freeze,
PhantomData<dyn Future<Output = Result<OwnedPermit<Bytes>, PollSendError<Bytes>>> + Send>: Freeze,
*const ArcInner<dyn NativeDatagramChannel> is !null: Freeze,
PhantomData<ArcInner<dyn NativeDatagramChannel>>: Freeze,
*const ArcInner<Shared<Mode>> is !null: Freeze,
PhantomData<ArcInner<Shared<Mode>>>: Freeze,
*const ArcInner<Shared<()>> is !null: Freeze,
PhantomData<ArcInner<Shared<()>>>: Freeze,
*const ArcInner<Node> is !null: Freeze,
PhantomData<ArcInner<Node>>: Freeze,
impl<I> Move for ConnectUdpTunnel<I>
impl<I> Send for ConnectUdpTunnel<I>
impl<I> Sync for ConnectUdpTunnel<I>
impl<I> Unpin for ConnectUdpTunnel<I>
impl<I> UnsafeUnpin for ConnectUdpTunnel<I>where
I: UnsafeUnpin,
*const ArcInner<Chan<Bytes, Semaphore>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Chan<Bytes, Semaphore>>>: UnsafeUnpin,
*const dyn Future<Output = Result<OwnedPermit<Bytes>, PollSendError<Bytes>>> + Send is !null: UnsafeUnpin,
PhantomData<dyn Future<Output = Result<OwnedPermit<Bytes>, PollSendError<Bytes>>> + Send>: UnsafeUnpin,
*const ArcInner<dyn NativeDatagramChannel> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn NativeDatagramChannel>>: UnsafeUnpin,
*const ArcInner<Shared<Mode>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared<Mode>>>: UnsafeUnpin,
*const ArcInner<Shared<()>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared<()>>>: UnsafeUnpin,
*const ArcInner<Node> is !null: UnsafeUnpin,
PhantomData<ArcInner<Node>>: UnsafeUnpin,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> ForwardedClientExt for Twhere
T: ExtensionsRef + ?Sized,
impl<T> ForwardedClientExt for Twhere
T: ExtensionsRef + ?Sized,
§fn trusted_forwarded(&self) -> Option<&Forwarded>
fn trusted_forwarded(&self) -> Option<&Forwarded>
§fn forwarded_client(&self) -> Option<&ForwardedElement>
fn forwarded_client(&self) -> Option<&ForwardedElement>
§fn forwarded_client_ip(&self) -> Option<IpAddr>
fn forwarded_client_ip(&self) -> Option<IpAddr>
for node.§fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>
fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>
for node.§fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>
fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>
§fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
§fn forwarded_client_version(&self) -> Option<ForwardedVersion>
fn forwarded_client_version(&self) -> Option<ForwardedVersion>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more