Struct DatagramForwardService
pub struct DatagramForwardService { /* private fields */ }std and udp only.Expand description
Per-association memory and metadata policy.
Implementations§
§impl DatagramForwardService
impl DatagramForwardService
pub const fn new(
buffer_bytes: NonZero<usize>,
ecn: EcnPolicy,
) -> DatagramForwardService
pub const fn new( buffer_bytes: NonZero<usize>, ecn: EcnPolicy, ) -> DatagramForwardService
Bound each direction’s receive buffer and select an explicit ECN policy. There is no implicit metadata loss or unbounded default allocation.
pub fn with_buffer_bytes(self, bytes: NonZero<usize>) -> DatagramForwardService
pub fn with_buffer_bytes(self, bytes: NonZero<usize>) -> DatagramForwardService
Maximum receive-buffer bytes per direction, including a GRO group. Two buffers are retained at most; oversized input fails as truncated.
pub fn set_buffer_bytes(
&mut self,
bytes: NonZero<usize>,
) -> &mut DatagramForwardService
pub fn set_buffer_bytes( &mut self, bytes: NonZero<usize>, ) -> &mut DatagramForwardService
Maximum receive-buffer bytes per direction, including a GRO group. Two buffers are retained at most; oversized input fails as truncated.
pub fn with_ecn(self, policy: EcnPolicy) -> DatagramForwardService
pub fn with_ecn(self, policy: EcnPolicy) -> DatagramForwardService
Select whether both directions preserve ECN or explicitly discard it.
pub fn set_ecn(&mut self, policy: EcnPolicy) -> &mut DatagramForwardService
pub fn set_ecn(&mut self, policy: EcnPolicy) -> &mut DatagramForwardService
Select whether both directions preserve ECN or explicitly discard it.
Trait Implementations§
§impl Clone for DatagramForwardService
impl Clone for DatagramForwardService
§fn clone(&self) -> DatagramForwardService
fn clone(&self) -> DatagramForwardService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DatagramForwardService
§impl Debug for DatagramForwardService
impl Debug for DatagramForwardService
§impl<A, B> Service<BridgeIo<A, B>> for DatagramForwardServicewhere
A: DatagramSocket,
B: DatagramSocket,
Forward between two connected sockets, as Peer::connected makes them: a
DatagramToProxyBridge association, for example.
impl<A, B> Service<BridgeIo<A, B>> for DatagramForwardServicewhere
A: DatagramSocket,
B: DatagramSocket,
Forward between two connected sockets, as Peer::connected makes them: a
DatagramToProxyBridge association, for example.
§type Error = DatagramForwardError
type Error = DatagramForwardError
§async fn serve(
&self,
__arg1: BridgeIo<A, B>,
) -> Result<(), <DatagramForwardService as Service<BridgeIo<A, B>>>::Error>
async fn serve( &self, __arg1: BridgeIo<A, B>, ) -> Result<(), <DatagramForwardService as Service<BridgeIo<A, B>>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
§impl<A, B> Service<BridgeIo<Peer<A>, Peer<B>>> for DatagramForwardServicewhere
A: DatagramSocket,
B: DatagramSocket,
impl<A, B> Service<BridgeIo<Peer<A>, Peer<B>>> for DatagramForwardServicewhere
A: DatagramSocket,
B: DatagramSocket,
§async fn serve(
&self,
__arg1: BridgeIo<Peer<A>, Peer<B>>,
) -> Result<(), DatagramForwardError>
async fn serve( &self, __arg1: BridgeIo<Peer<A>, Peer<B>>, ) -> Result<(), DatagramForwardError>
Forward both directions until an I/O or preservation error occurs. Dropping the future drops its socket owners and pending send handles. Apply association admission, idle expiration and shutdown in the caller.
§type Error = DatagramForwardError
type Error = DatagramForwardError
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl Freeze for DatagramForwardService
impl RefUnwindSafe for DatagramForwardService
impl Send for DatagramForwardService
impl Sync for DatagramForwardService
impl Unpin for DatagramForwardService
impl UnsafeUnpin for DatagramForwardService
impl UnwindSafe for DatagramForwardService
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<S, Input, Connection> ConnectorService<Input> for Swhere
S: Service<Input, Output = EstablishedClientConnection<Connection, Input>>,
<S as Service<Input>>::Error: Into<ConnectionError>,
Connection: Send + ExtensionsRef,
impl<S, Input, Connection> ConnectorService<Input> for Swhere
S: Service<Input, Output = EstablishedClientConnection<Connection, Input>>,
<S as Service<Input>>::Error: Into<ConnectionError>,
Connection: Send + ExtensionsRef,
§type Connection = Connection
type Connection = Connection
ConnectorService§fn connect(
&self,
input: Input,
) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, ConnectionError>> + Send
fn connect( &self, input: Input, ) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, ConnectionError>> + Send
§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