Struct HttpDatagramRelay
pub struct HttpDatagramRelay { /* private fields */ }http and std only.Expand description
Forward a tunnel whose application explicitly selected HTTP Datagram semantics.
Reliable DATAGRAM capsules stay reliable. Native datagrams use the next hop’s
native carrier when available and DATAGRAM capsules otherwise. Unknown capsule
values stream within the configured read bound; their integer headers are
re-encoded minimally, as by SessionSender::start_capsule.
While a capsule value is in progress, native input stays in the transport’s
bounded queue. No additional datagram queue or whole-capsule buffer is added.
Errors and cancellation abort both I/Os when they publish their own AbortIo.
Ordinary byte tunnels should use IoForwardService instead.
Implementations§
§impl HttpDatagramRelay
impl HttpDatagramRelay
pub fn new(config: SessionConfig) -> HttpDatagramRelay
pub fn new(config: SessionConfig) -> HttpDatagramRelay
Use the supplied read/datagram/control limits and native send policy. Unknown capsules are always forwarded, rather than skipped as at an endpoint.
Trait Implementations§
§impl Clone for HttpDatagramRelay
impl Clone for HttpDatagramRelay
§fn clone(&self) -> HttpDatagramRelay
fn clone(&self) -> HttpDatagramRelay
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 HttpDatagramRelay
impl Debug for HttpDatagramRelay
§impl Default for HttpDatagramRelay
impl Default for HttpDatagramRelay
§fn default() -> HttpDatagramRelay
fn default() -> HttpDatagramRelay
§impl<L, R> Service<BridgeIo<L, R>> for HttpDatagramRelay
impl<L, R> Service<BridgeIo<L, R>> for HttpDatagramRelay
§type Output = DatagramRelayOutcome
type Output = DatagramRelayOutcome
§type Error = SessionError
type Error = SessionError
§fn serve(
&self,
_: BridgeIo<L, R>,
) -> impl Future<Output = Result<<HttpDatagramRelay as Service<BridgeIo<L, R>>>::Output, <HttpDatagramRelay as Service<BridgeIo<L, R>>>::Error>> + Send
fn serve( &self, _: BridgeIo<L, R>, ) -> impl Future<Output = Result<<HttpDatagramRelay as Service<BridgeIo<L, R>>>::Output, <HttpDatagramRelay as Service<BridgeIo<L, R>>>::Error>> + Send
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl Freeze for HttpDatagramRelay
impl RefUnwindSafe for HttpDatagramRelay
impl Send for HttpDatagramRelay
impl Sync for HttpDatagramRelay
impl Unpin for HttpDatagramRelay
impl UnsafeUnpin for HttpDatagramRelay
impl UnwindSafe for HttpDatagramRelay
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