Struct ConnectUdpSocketConfig
pub struct ConnectUdpSocketConfig { /* private fields */ }masque only.Expand description
Limits of a ConnectUdpSocket.
The socket’s extensions are a child connection of the carrier’s, so
the carrier’s flow-scoped extensions keep resolving through; only its
connection-scoped facts stop at the boundary, except what
Self::with_extensions_transfer carries over,
DefaultExtensionsTransfer by default.
Implementations§
§impl ConnectUdpSocketConfig
impl ConnectUdpSocketConfig
pub fn with_extensions_transfer(
self,
transfer: impl ExtensionsTransfer,
) -> ConnectUdpSocketConfig
pub fn with_extensions_transfer( self, transfer: impl ExtensionsTransfer, ) -> ConnectUdpSocketConfig
Which of the carrier’s connection-scoped facts the tunnel keeps.
DefaultExtensionsTransfer by default. The carrier’s flow-scoped
extensions are inherited either way.
pub fn set_extensions_transfer(
&mut self,
transfer: impl ExtensionsTransfer,
) -> &mut ConnectUdpSocketConfig
pub fn set_extensions_transfer( &mut self, transfer: impl ExtensionsTransfer, ) -> &mut ConnectUdpSocketConfig
Which of the carrier’s connection-scoped facts the tunnel keeps.
DefaultExtensionsTransfer by default. The carrier’s flow-scoped
extensions are inherited either way.
pub fn maybe_with_min_payload(
self,
min: Option<usize>,
) -> ConnectUdpSocketConfig
pub fn maybe_with_min_payload( self, min: Option<usize>, ) -> ConnectUdpSocketConfig
The smallest payload limit the owner can work with, such as QUIC’s 1200 bytes: once
the native limit falls below it, sends fail with ConnectUdpCapacityError and the
tunnel closes (ConnectUdpClose::Capacity) instead of losing every payload.
pub fn maybe_set_min_payload(
&mut self,
min: Option<usize>,
) -> &mut ConnectUdpSocketConfig
pub fn maybe_set_min_payload( &mut self, min: Option<usize>, ) -> &mut ConnectUdpSocketConfig
The smallest payload limit the owner can work with, such as QUIC’s 1200 bytes: once
the native limit falls below it, sends fail with ConnectUdpCapacityError and the
tunnel closes (ConnectUdpClose::Capacity) instead of losing every payload.
pub fn with_min_payload(self, min: usize) -> ConnectUdpSocketConfig
pub fn with_min_payload(self, min: usize) -> ConnectUdpSocketConfig
The smallest payload limit the owner can work with, such as QUIC’s 1200 bytes: once
the native limit falls below it, sends fail with ConnectUdpCapacityError and the
tunnel closes (ConnectUdpClose::Capacity) instead of losing every payload.
pub fn set_min_payload(&mut self, min: usize) -> &mut ConnectUdpSocketConfig
pub fn set_min_payload(&mut self, min: usize) -> &mut ConnectUdpSocketConfig
The smallest payload limit the owner can work with, such as QUIC’s 1200 bytes: once
the native limit falls below it, sends fail with ConnectUdpCapacityError and the
tunnel closes (ConnectUdpClose::Capacity) instead of losing every payload.
pub fn without_min_payload(self) -> ConnectUdpSocketConfig
pub fn without_min_payload(self) -> ConnectUdpSocketConfig
The smallest payload limit the owner can work with, such as QUIC’s 1200 bytes: once
the native limit falls below it, sends fail with ConnectUdpCapacityError and the
tunnel closes (ConnectUdpClose::Capacity) instead of losing every payload.
pub fn unset_min_payload(&mut self) -> &mut ConnectUdpSocketConfig
pub fn unset_min_payload(&mut self) -> &mut ConnectUdpSocketConfig
The smallest payload limit the owner can work with, such as QUIC’s 1200 bytes: once
the native limit falls below it, sends fail with ConnectUdpCapacityError and the
tunnel closes (ConnectUdpClose::Capacity) instead of losing every payload.
pub fn maybe_with_proxy_packet_size(
self,
size: Option<u16>,
) -> ConnectUdpSocketConfig
pub fn maybe_with_proxy_packet_size( self, size: Option<u16>, ) -> ConnectUdpSocketConfig
The UDP payload size of the packets the proxy sends, such as the initial MTU of its QUIC transport: what comes back through the tunnel is sized to fit in them.
Unknown by default, which assumes the 1280-byte packets common QUIC stacks start at. A proxy which sends larger packets leaves room for a QUIC connection tunneled through this one to tunnel QUIC itself.
pub fn maybe_set_proxy_packet_size(
&mut self,
size: Option<u16>,
) -> &mut ConnectUdpSocketConfig
pub fn maybe_set_proxy_packet_size( &mut self, size: Option<u16>, ) -> &mut ConnectUdpSocketConfig
The UDP payload size of the packets the proxy sends, such as the initial MTU of its QUIC transport: what comes back through the tunnel is sized to fit in them.
Unknown by default, which assumes the 1280-byte packets common QUIC stacks start at. A proxy which sends larger packets leaves room for a QUIC connection tunneled through this one to tunnel QUIC itself.
pub fn with_proxy_packet_size(self, size: u16) -> ConnectUdpSocketConfig
pub fn with_proxy_packet_size(self, size: u16) -> ConnectUdpSocketConfig
The UDP payload size of the packets the proxy sends, such as the initial MTU of its QUIC transport: what comes back through the tunnel is sized to fit in them.
Unknown by default, which assumes the 1280-byte packets common QUIC stacks start at. A proxy which sends larger packets leaves room for a QUIC connection tunneled through this one to tunnel QUIC itself.
pub fn set_proxy_packet_size(
&mut self,
size: u16,
) -> &mut ConnectUdpSocketConfig
pub fn set_proxy_packet_size( &mut self, size: u16, ) -> &mut ConnectUdpSocketConfig
The UDP payload size of the packets the proxy sends, such as the initial MTU of its QUIC transport: what comes back through the tunnel is sized to fit in them.
Unknown by default, which assumes the 1280-byte packets common QUIC stacks start at. A proxy which sends larger packets leaves room for a QUIC connection tunneled through this one to tunnel QUIC itself.
pub fn without_proxy_packet_size(self) -> ConnectUdpSocketConfig
pub fn without_proxy_packet_size(self) -> ConnectUdpSocketConfig
The UDP payload size of the packets the proxy sends, such as the initial MTU of its QUIC transport: what comes back through the tunnel is sized to fit in them.
Unknown by default, which assumes the 1280-byte packets common QUIC stacks start at. A proxy which sends larger packets leaves room for a QUIC connection tunneled through this one to tunnel QUIC itself.
pub fn unset_proxy_packet_size(&mut self) -> &mut ConnectUdpSocketConfig
pub fn unset_proxy_packet_size(&mut self) -> &mut ConnectUdpSocketConfig
The UDP payload size of the packets the proxy sends, such as the initial MTU of its QUIC transport: what comes back through the tunnel is sized to fit in them.
Unknown by default, which assumes the 1280-byte packets common QUIC stacks start at. A proxy which sends larger packets leaves room for a QUIC connection tunneled through this one to tunnel QUIC itself.
pub fn with_queue(self, queue: NonZero<usize>) -> ConnectUdpSocketConfig
pub fn with_queue(self, queue: NonZero<usize>) -> ConnectUdpSocketConfig
UDP payloads accepted for sending but not yet handed to the HTTP carrier.
pub fn set_queue(
&mut self,
queue: NonZero<usize>,
) -> &mut ConnectUdpSocketConfig
pub fn set_queue( &mut self, queue: NonZero<usize>, ) -> &mut ConnectUdpSocketConfig
UDP payloads accepted for sending but not yet handed to the HTTP carrier.
pub fn with_idle_timeout(self, timeout: Duration) -> ConnectUdpSocketConfig
pub fn with_idle_timeout(self, timeout: Duration) -> ConnectUdpSocketConfig
How long the tunnel may forward nothing before it closes (dropped datagrams never count as progress).
pub fn set_idle_timeout(
&mut self,
timeout: Duration,
) -> &mut ConnectUdpSocketConfig
pub fn set_idle_timeout( &mut self, timeout: Duration, ) -> &mut ConnectUdpSocketConfig
How long the tunnel may forward nothing before it closes (dropped datagrams never count as progress).
pub fn with_close_grace(self, grace: Duration) -> ConnectUdpSocketConfig
pub fn with_close_grace(self, grace: Duration) -> ConnectUdpSocketConfig
How long a closing tunnel may wait for its peer, first to drain what a closed destination still receives and then to end its own direction, before the carrier is dropped. A peer that stopped reading holds the tunnel no longer than this, and the hard phase of the tunnel’s scope ends the wait at once. Defaults to five seconds; zero drops the carrier without waiting.
pub fn set_close_grace(
&mut self,
grace: Duration,
) -> &mut ConnectUdpSocketConfig
pub fn set_close_grace( &mut self, grace: Duration, ) -> &mut ConnectUdpSocketConfig
How long a closing tunnel may wait for its peer, first to drain what a closed destination still receives and then to end its own direction, before the carrier is dropped. A peer that stopped reading holds the tunnel no longer than this, and the hard phase of the tunnel’s scope ends the wait at once. Defaults to five seconds; zero drops the carrier without waiting.
Trait Implementations§
§impl Clone for ConnectUdpSocketConfig
impl Clone for ConnectUdpSocketConfig
§fn clone(&self) -> ConnectUdpSocketConfig
fn clone(&self) -> ConnectUdpSocketConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ConnectUdpSocketConfig
impl Debug for ConnectUdpSocketConfig
§impl Default for ConnectUdpSocketConfig
impl Default for ConnectUdpSocketConfig
§fn default() -> ConnectUdpSocketConfig
fn default() -> ConnectUdpSocketConfig
Auto Trait Implementations§
impl !RefUnwindSafe for ConnectUdpSocketConfig
impl !UnwindSafe for ConnectUdpSocketConfig
impl Forget for ConnectUdpSocketConfig
impl Freeze for ConnectUdpSocketConfigwhere
*const ArcInner<dyn ExtensionsTransfer> is !null: Freeze,
PhantomData<ArcInner<dyn ExtensionsTransfer>>: Freeze,
NonZero<usize>: Freeze,
impl Move for ConnectUdpSocketConfig
impl Send for ConnectUdpSocketConfig
impl Sync for ConnectUdpSocketConfig
impl Unpin for ConnectUdpSocketConfig
impl UnsafeUnpin for ConnectUdpSocketConfigwhere
*const ArcInner<dyn ExtensionsTransfer> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ExtensionsTransfer>>: UnsafeUnpin,
NonZeroUsizeInner: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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