Skip to main content

Bridge

Struct Bridge 

pub struct Bridge<Ingress, Egress> {
    pub ingress: Ingress,
    pub egress: Egress,
}
Available on crate feature std only.
Expand description

Two established sides joined by a relay.

The ingress side faces the client, the egress side faces the server. In a peer to peer topology both sides are equal nodes and those names are only a direction convention.

Each side carries a marker naming its kind: ByteIo, QuicIo, MessageIo or DatagramIo. A Service can therefore serve several side kinds, and mixes such as a byte ingress with a quic egress, without its impls overlapping.

The leaf layer that establishes the second side is the one that wraps both sides, with Self::io, Self::quic, Self::messages or Self::datagrams. Layers in between pass the bridge on unchanged.

Markers are transparent: each one derefs to the value it wraps and forwards the traits of its kind, so a side is used where its inner value was.

ExtensionsRef reads the ingress side, as a flow keeps moving from ingress to egress until the relay starts to move data. Read the egress extensions explicitly where you need them.

Fields§

§ingress: Ingress

The side facing the client.

§egress: Egress

The side facing the server.

Implementations§

§

impl<Ingress, Egress> Bridge<ByteIo<Ingress>, ByteIo<Egress>>

pub const fn io( ingress: Ingress, egress: Egress, ) -> Bridge<ByteIo<Ingress>, ByteIo<Egress>>

Bridge two byte streams, see ByteIo.

§

impl<Ingress, Egress> Bridge<QuicIo<Ingress>, QuicIo<Egress>>

pub const fn quic( ingress: Ingress, egress: Egress, ) -> Bridge<QuicIo<Ingress>, QuicIo<Egress>>

Bridge two QUIC connections, see QuicIo.

§

impl<Ingress, Egress> Bridge<MessageIo<Ingress>, MessageIo<Egress>>

pub const fn messages( ingress: Ingress, egress: Egress, ) -> Bridge<MessageIo<Ingress>, MessageIo<Egress>>

Bridge two message transports, see MessageIo.

§

impl<Ingress, Egress> Bridge<DatagramIo<Ingress>, DatagramIo<Egress>>

pub const fn datagrams( ingress: Ingress, egress: Egress, ) -> Bridge<DatagramIo<Ingress>, DatagramIo<Egress>>

Bridge two datagram sockets, see DatagramIo.

Trait Implementations§

§

impl<Ingress, Egress> Clone for Bridge<Ingress, Egress>
where Ingress: Clone, Egress: Clone,

§

fn clone(&self) -> Bridge<Ingress, Egress>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<Ingress, Egress> DatagramPeekInput for Bridge<DatagramIo<Ingress>, DatagramIo<Egress>>
where Ingress: DatagramSocket, Egress: Send + 'static,

§

type Socket = Ingress

The socket an inspection reads from.
§

type Mapped<Peeked: DatagramSocket> = Bridge<DatagramIo<Peeked>, DatagramIo<Egress>>

This input with its peeked socket replaced, usually by a PrefixedDatagramSocket.
§

fn peek_socket_mut( &mut self, ) -> &mut <Bridge<DatagramIo<Ingress>, DatagramIo<Egress>> as DatagramPeekInput>::Socket

The socket an inspection reads from.
§

fn into_peek_socket( self, ) -> <Bridge<DatagramIo<Ingress>, DatagramIo<Egress>> as DatagramPeekInput>::Socket

Consume the input and take its ingress socket, dropping any unused egress context.
§

fn map_peek_socket<Peeked, F>( self, map: F, ) -> <Bridge<DatagramIo<Ingress>, DatagramIo<Egress>> as DatagramPeekInput>::Mapped<Peeked>
where Peeked: DatagramSocket, F: FnOnce(<Bridge<DatagramIo<Ingress>, DatagramIo<Egress>> as DatagramPeekInput>::Socket) -> Peeked,

Rebuild this input around map’s result for its peeked socket.
§

impl<Ingress, Egress> Debug for Bridge<Ingress, Egress>
where Ingress: Debug, Egress: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<Ingress, Egress> ExtensionsRef for Bridge<Ingress, Egress>
where Ingress: ExtensionsRef,

§

fn extensions(&self) -> &Extensions

Get reference to the underlying Extensions store
§

impl<Ingress, Egress> PeekIoProvider for Bridge<ByteIo<Ingress>, ByteIo<Egress>>
where Ingress: Io, Egress: Io,

§

type PeekIo = Ingress

The ingress type that can be peeked.
§

type PeekEgressIo = Egress

The egress type that can be peeked, NoPeekEgress when there is none.
§

type Mapped<PeekedIngress: Io, PeekedEgress: Io> = Bridge<ByteIo<PeekedIngress>, ByteIo<PeekedEgress>>

The mapped Self type produced as a result of mapping the PeekIo and PeekEgressIo types.
§

fn peek_ios_mut( &mut self, ) -> (&mut <Bridge<ByteIo<Ingress>, ByteIo<Egress>> as PeekIoProvider>::PeekIo, Option<&mut <Bridge<ByteIo<Ingress>, ByteIo<Egress>> as PeekIoProvider>::PeekEgressIo>)

Retrieve mutable references to the peekable ingress and, if there is one, the peekable egress.
§

fn map_peek_io<PeekedIngress, PeekedEgress, F, G>( self, map: F, map_egress: G, ) -> <Bridge<ByteIo<Ingress>, ByteIo<Egress>> as PeekIoProvider>::Mapped<PeekedIngress, PeekedEgress>
where PeekedIngress: Io, PeekedEgress: Io, F: FnOnce(<Bridge<ByteIo<Ingress>, ByteIo<Egress>> as PeekIoProvider>::PeekIo) -> PeekedIngress, G: FnOnce(<Bridge<ByteIo<Ingress>, ByteIo<Egress>> as PeekIoProvider>::PeekEgressIo) -> PeekedEgress,

Once peeking is finished one can reproduce self by mapping the peeked ingress and egress, usually with the peeked data in-memory as prefix. Read more
§

impl<Issuer, Inner, Ingress, Egress> Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>> for TlsMitmRelayService<Issuer, Inner>
where Issuer: BoringMitmCertIssuer, <Issuer as BoringMitmCertIssuer>::Error: Into<Box<dyn Error + Sync + Send>>, Inner: Service<Bridge<ByteIo<TlsStream<Ingress>>, ByteIo<TlsStream<Egress>>>>, <Inner as Service<Bridge<ByteIo<TlsStream<Ingress>>, ByteIo<TlsStream<Egress>>>>>::Error: Into<Box<dyn Error + Sync + Send>>, Ingress: Io + Unpin + ExtensionsRef, Egress: Io + Unpin + ExtensionsRef,

§

type Output = ()

The type of the output returned by the service.
§

type Error = TlsMitmRelayError

The type of error returned by the service.
§

async fn serve( &self, input: Bridge<ByteIo<Ingress>, ByteIo<Egress>>, ) -> Result<<TlsMitmRelayService<Issuer, Inner> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Output, <TlsMitmRelayService<Issuer, Inner> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<Ingress, Egress, M, P> Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>> for HttpMitmRelay<M, P>

§

type Output = ()

The type of the output returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, __arg1: Bridge<ByteIo<Ingress>, ByteIo<Egress>>, ) -> Result<<HttpMitmRelay<M, P> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Output, <HttpMitmRelay<M, P> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Ingress, Egress> Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>> for WebSocketRelayIoService<S>
where S: Service<Bridge<MessageIo<AsyncWebSocket<Ingress>>, MessageIo<AsyncWebSocket<Egress>>>>, Ingress: Io + Unpin + ExtensionsRef, Egress: Io + Unpin + ExtensionsRef,

§

type Output = <S as Service<Bridge<MessageIo<AsyncWebSocket<Ingress>>, MessageIo<AsyncWebSocket<Egress>>>>>::Output

The type of the output returned by the service.
§

type Error = <S as Service<Bridge<MessageIo<AsyncWebSocket<Ingress>>, MessageIo<AsyncWebSocket<Egress>>>>>::Error

The type of error returned by the service.
§

async fn serve( &self, bridge: Bridge<ByteIo<Ingress>, ByteIo<Egress>>, ) -> Result<<WebSocketRelayIoService<S> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Output, <WebSocketRelayIoService<S> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Ingress, Egress> Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>> for WebSocketRelayService<S>

§

type Output = ()

The type of the output returned by the service.
§

type Error = !

The type of error returned by the service.
§

async fn serve( &self, bridge: Bridge<ByteIo<Ingress>, ByteIo<Egress>>, ) -> Result<<WebSocketRelayService<S> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Output, <WebSocketRelayService<S> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Ingress, Egress> Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>> for WebSocketRelayEventService<S>

§

type Output = ()

The type of the output returned by the service.
§

type Error = !

The type of error returned by the service.
§

async fn serve( &self, bridge: Bridge<ByteIo<Ingress>, ByteIo<Egress>>, ) -> Result<<WebSocketRelayEventService<S> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Output, <WebSocketRelayEventService<S> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<I, F, Ingress, Egress> Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>> for Socks5MitmRelayService<I, F>
where I: Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>, <I as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Error: Into<Box<dyn Error + Sync + Send>>, F: Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>, <F as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Error: Into<Box<dyn Error + Sync + Send>>, Ingress: Io + Unpin + ExtensionsRef, Egress: Io + Unpin + ExtensionsRef,

§

type Output = ()

The type of the output returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, __arg1: Bridge<ByteIo<Ingress>, ByteIo<Egress>>, ) -> Result<<Socks5MitmRelayService<I, F> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Output, <Socks5MitmRelayService<I, F> as Service<Bridge<ByteIo<Ingress>, ByteIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<L, R> Service<Bridge<ByteIo<L>, ByteIo<R>>> for HttpDatagramRelay
where L: Io + Unpin + ExtensionsRef, R: Io + Unpin + ExtensionsRef,

§

type Output = DatagramRelayOutcome

The type of the output returned by the service.
§

type Error = SessionError

The type of error returned by the service.
§

fn serve( &self, _: Bridge<ByteIo<L>, ByteIo<R>>, ) -> impl Future<Output = Result<<HttpDatagramRelay as Service<Bridge<ByteIo<L>, ByteIo<R>>>>::Output, <HttpDatagramRelay as Service<Bridge<ByteIo<L>, ByteIo<R>>>>::Error>> + Send

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T> Service<Bridge<ByteIo<S>, ByteIo<T>>> for IoForwardService
where S: Io + Unpin + ExtensionsRef, T: Io + Unpin + ExtensionsRef,

§

type Output = IoForwardOutcome

The type of the output returned by the service.
§

type Error = IoForwardError

The type of error returned by the service.
§

async fn serve( &self, __arg1: Bridge<ByteIo<S>, ByteIo<T>>, ) -> Result<<IoForwardService as Service<Bridge<ByteIo<S>, ByteIo<T>>>>::Output, <IoForwardService as Service<Bridge<ByteIo<S>, ByteIo<T>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<A, B> Service<Bridge<DatagramIo<A>, DatagramIo<B>>> for DatagramForwardService

Forward between two connected sockets, as Peer::connected makes them: a DatagramToProxyBridge association, for example.

§

type Output = ()

The type of the output returned by the service.
§

type Error = DatagramForwardError

The type of error returned by the service.
§

async fn serve( &self, __arg1: Bridge<DatagramIo<A>, DatagramIo<B>>, ) -> Result<(), <DatagramForwardService as Service<Bridge<DatagramIo<A>, DatagramIo<B>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<A, B> Service<Bridge<DatagramIo<A>, DatagramIo<B>>> for ConnectUdpRelay

§

type Output = ()

The type of the output returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, sockets: Bridge<DatagramIo<A>, DatagramIo<B>>, ) -> Result<(), Box<dyn Error + Sync + Send>>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<A, B> Service<Bridge<DatagramIo<Peer<A>>, DatagramIo<Peer<B>>>> for DatagramForwardService

§

async fn serve( &self, __arg1: Bridge<DatagramIo<Peer<A>>, DatagramIo<Peer<B>>>, ) -> Result<(), DatagramForwardError>

Forward both directions. A closed destination drains the sibling for at most the close timeout; a closed receive side ends the association after its buffered input. Other I/O or preservation errors cancel both directions. Dropping the future drops its socket owners and pending send handles. Apply association admission, idle expiration and shutdown in the caller.

§

type Output = ()

The type of the output returned by the service.
§

type Error = DatagramForwardError

The type of error returned by the service.
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<A, B, T, EA, EB> Service<Bridge<MessageIo<A>, MessageIo<B>>> for StreamForwardService
where A: Stream<Item = Result<T, EA>> + Sink<T, Error = EA> + Send + Unpin + 'static, B: Stream<Item = Result<T, EB>> + Sink<T, Error = EB> + Send + Unpin + 'static, T: Send + 'static, EA: Into<Box<dyn Error + Sync + Send>> + Send + 'static, EB: Into<Box<dyn Error + Sync + Send>> + Send + 'static,

§

type Output = BridgeCloseReason

The type of the output returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, __arg1: Bridge<MessageIo<A>, MessageIo<B>>, ) -> Result<<StreamForwardService as Service<Bridge<MessageIo<A>, MessageIo<B>>>>::Output, <StreamForwardService as Service<Bridge<MessageIo<A>, MessageIo<B>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Ingress, Egress> Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>> for WebSocketRelayService<S>

§

type Output = ()

The type of the output returned by the service.
§

type Error = !

The type of error returned by the service.
§

async fn serve( &self, __arg1: Bridge<MessageIo<Ingress>, MessageIo<Egress>>, ) -> Result<<WebSocketRelayService<S> as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Output, <WebSocketRelayService<S> as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Ingress, Egress> Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>> for WebSocketRelayEventService<S>

§

type Output = ()

The type of the output returned by the service.
§

type Error = !

The type of error returned by the service.
§

async fn serve( &self, __arg1: Bridge<MessageIo<Ingress>, MessageIo<Egress>>, ) -> Result<<WebSocketRelayEventService<S> as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Output, <WebSocketRelayEventService<S> as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<Inner, Ingress, Egress> Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>> for HARWebSocketService<Inner>
where Inner: Service<Bridge<MessageIo<HARWebSocket<Ingress>>, MessageIo<HARWebSocket<Egress>>>>, Ingress: WebSocketIo, Egress: WebSocketIo,

§

type Output = <Inner as Service<Bridge<MessageIo<HARWebSocket<Ingress>>, MessageIo<HARWebSocket<Egress>>>>>::Output

The type of the output returned by the service.
§

type Error = <Inner as Service<Bridge<MessageIo<HARWebSocket<Ingress>>, MessageIo<HARWebSocket<Egress>>>>>::Error

The type of error returned by the service.
§

async fn serve( &self, __arg1: Bridge<MessageIo<Ingress>, MessageIo<Egress>>, ) -> Result<<HARWebSocketService<Inner> as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Output, <HARWebSocketService<Inner> as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Ingress, Egress> Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>> for CaptureWebSocketService<S>
where S: Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>, Ingress: ExtensionsRef + Send + 'static, Egress: ExtensionsRef + Send + 'static,

§

type Output = <S as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Output

The type of the output returned by the service.
§

type Error = <S as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Error

The type of error returned by the service.
§

async fn serve( &self, bridge: Bridge<MessageIo<Ingress>, MessageIo<Egress>>, ) -> Result<<CaptureWebSocketService<S> as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Output, <CaptureWebSocketService<S> as Service<Bridge<MessageIo<Ingress>, MessageIo<Egress>>>>::Error>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl Service<Bridge<QuicIo<Connection>, QuicIo<Connection>>> for QuicRelay

§

fn serve( &self, _: Bridge<QuicIo<Connection>, QuicIo<Connection>>, ) -> impl Future<Output = Result<(), Box<dyn Error + Sync + Send>>> + Send

Relay dedicated, established connections until either connection ends.

ingress is a server connection and egress a client connection. Both hops must negotiate the same nonempty ALPN. Do not consume their streams or datagrams concurrently elsewhere. Configure receive datagram advertisements to match this policy before establishing either hop. Neither hop may have enabled early-data keys: this generic relay does not decide application replay safety. Configure TLS early data off on both hops.

Dropping this future closes both connections, including streams waiting for remote credit. Connection-level transport errors are returned locally and mapped to failure_code on the other hop; they are not fabricated as transport errors belonging to that independent connection.

§

type Output = ()

The type of the output returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S> Service<Bridge<QuicIo<Connection>, QuicIo<Connection>>> for QuicMigrationService<S>

§

type Output = <S as Service<Bridge<QuicIo<Connection>, QuicIo<Connection>>>>::Output

The type of the output returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, input: Bridge<QuicIo<Connection>, QuicIo<Connection>>, ) -> Result<<QuicMigrationService<S> as Service<Bridge<QuicIo<Connection>, QuicIo<Connection>>>>::Output, Box<dyn Error + Sync + Send>>

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<I, E, M, P, D> Service<Bridge<QuicIo<I>, QuicIo<E>>> for Http3MitmRelay<M, P, D>

§

type Output = ()

The type of the output returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

fn serve( &self, _: Bridge<QuicIo<I>, QuicIo<E>>, ) -> impl Future<Output = Result<(), Box<dyn Error + Sync + Send>>> + Send

Serve an output or an error for the given input
§

fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>

Box this service to allow for dynamic dispatch.

Auto Trait Implementations§

§

impl<Ingress, Egress> Forget for Bridge<Ingress, Egress>

§

impl<Ingress, Egress> Freeze for Bridge<Ingress, Egress>
where Ingress: Freeze, Egress: Freeze,

§

impl<Ingress, Egress> Move for Bridge<Ingress, Egress>

§

impl<Ingress, Egress> RefUnwindSafe for Bridge<Ingress, Egress>
where Ingress: RefUnwindSafe, Egress: RefUnwindSafe,

§

impl<Ingress, Egress> Send for Bridge<Ingress, Egress>
where Egress: Send, Ingress: Send,

§

impl<Ingress, Egress> Sync for Bridge<Ingress, Egress>
where Egress: Sync, Ingress: Sync,

§

impl<Ingress, Egress> Unpin for Bridge<Ingress, Egress>
where Egress: Unpin, Ingress: Unpin,

§

impl<Ingress, Egress> UnsafeUnpin for Bridge<Ingress, Egress>
where Ingress: UnsafeUnpin, Egress: UnsafeUnpin,

§

impl<Ingress, Egress> UnwindSafe for Bridge<Ingress, Egress>
where Ingress: UnwindSafe, Egress: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> ForwardedClientExt for T
where T: ExtensionsRef + ?Sized,

§

fn trusted_forwarded(&self) -> Option<&Forwarded>

The chain as recorded, unless it came from a peer the policy does not trust: what may be selected from, or passed on to the next hop as this connection’s history.
§

fn forwarded_client(&self) -> Option<&ForwardedElement>

The element describing the client.
§

fn forwarded_client_ip(&self) -> Option<IpAddr>

The client’s IP, from its for node.
§

fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>

The client’s IP and port, from its for node.
§

fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>

The host the client asked for.
§

fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>

The protocol the client used.
§

fn forwarded_client_version(&self) -> Option<ForwardedVersion>

The HTTP version the client used.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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

§

fn into_request(self) -> Request<T>

Wrap the input message T in a rama_grpc::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
§

impl<T, U> RamaFrom<T> for U
where U: From<T>,

§

fn rama_from(value: T) -> U

§

impl<T, U, CrateMarker> RamaInto<U, CrateMarker> for T
where U: RamaFrom<T, CrateMarker>,

§

fn rama_into(self) -> U

§

impl<T, U> RamaTryFrom<T> for U
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

§

fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>

§

impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for T
where U: RamaTryFrom<T, CrateMarker>,

§

type Error = <U as RamaTryFrom<T, CrateMarker>>::Error

§

fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<V, F> ValueFormatter<&V> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &&V)

Write value to writer
§

impl<V, F> ValueFormatter<Arc<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Arc<V>)

Write value to writer
§

impl<V, F> ValueFormatter<Box<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Box<V>)

Write value to writer
§

impl<V, F> ValueFormatter<Cow<'_, V>> for F
where V: ToOwned + ?Sized, F: ValueFormatter<V> + ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)

Write value to writer
§

impl<V, F> ValueFormatter<Option<V>> for F
where F: ValueFormatter<V> + ?Sized,

§

const SHAPE: FieldShape<'static>

Available on non-metrique_require_explicit_impls only.
The shape of values produced by this formatter. Read more
§

fn format_value(writer: impl ValueWriter, value: &Option<V>)

Write value to writer
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more