Struct IoToProxyBridgeIoLayer
pub struct IoToProxyBridgeIoLayer<C = TcpConnector> { /* private fields */ }Expand description
A Layer that produces IoToProxyBridgeIo services.
Implementations§
§impl IoToProxyBridgeIoLayer
impl IoToProxyBridgeIoLayer
pub fn new(
exec: Executor,
target: impl Into<HostWithPort>,
) -> IoToProxyBridgeIoLayer
pub fn new( exec: Executor, target: impl Into<HostWithPort>, ) -> IoToProxyBridgeIoLayer
Creates a new IoToProxyBridgeIoLayer,
which will use by the IoToProxyBridgeIo Service the provided target info to connect to.
Use Self::extension_proxy_target if you wish to have it be done
using the ProxyTarget extension instead, failing the input flow
in case that extension not exist.
pub fn extension_proxy_target(exec: Executor) -> IoToProxyBridgeIoLayer
pub fn extension_proxy_target(exec: Executor) -> IoToProxyBridgeIoLayer
Creates a new IoToProxyBridgeIoLayer,
which will create the IoToProxyBridgeIo Service
that with this constructor will expect while serving that ProxyTarget
is available in the input’s extension, and fail otherwise.
Use Self::new if you wish to use a hardcoded target instead,
§impl IoToProxyBridgeIoLayer
impl IoToProxyBridgeIoLayer
pub fn with_connector<C>(self, connector: C) -> IoToProxyBridgeIoLayer<C>
pub fn with_connector<C>(self, connector: C) -> IoToProxyBridgeIoLayer<C>
Set a custom “connector” for layer’s service, overwriting the default tcp forwarder which simply establishes a TCP connection.
This can be useful for any custom middleware, but also to enrich with rama-provided services for tls connections, HAproxy client endoding or even an entirely custom tcp connector service.
§impl<C> IoToProxyBridgeIoLayer<C>
impl<C> IoToProxyBridgeIoLayer<C>
pub fn new_with_connector(
target: impl Into<HostWithPort>,
connector: C,
) -> IoToProxyBridgeIoLayer<C>
pub fn new_with_connector( target: impl Into<HostWithPort>, connector: C, ) -> IoToProxyBridgeIoLayer<C>
Same as Self::new but using a custom connector.
pub fn extension_proxy_target_with_connector(
connector: C,
) -> IoToProxyBridgeIoLayer<C>
pub fn extension_proxy_target_with_connector( connector: C, ) -> IoToProxyBridgeIoLayer<C>
Same as Self::extension_proxy_target but using a custom connector.
Trait Implementations§
§impl<C> Clone for IoToProxyBridgeIoLayer<C>where
C: Clone,
impl<C> Clone for IoToProxyBridgeIoLayer<C>where
C: Clone,
§fn clone(&self) -> IoToProxyBridgeIoLayer<C>
fn clone(&self) -> IoToProxyBridgeIoLayer<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<C> Debug for IoToProxyBridgeIoLayer<C>where
C: Debug,
impl<C> Debug for IoToProxyBridgeIoLayer<C>where
C: Debug,
§impl<S, C> Layer<S> for IoToProxyBridgeIoLayer<C>where
C: Clone,
impl<S, C> Layer<S> for IoToProxyBridgeIoLayer<C>where
C: Clone,
§type Service = IoToProxyBridgeIo<S, C>
type Service = IoToProxyBridgeIo<S, C>
§fn layer(&self, inner: S) -> <IoToProxyBridgeIoLayer<C> as Layer<S>>::Service
fn layer(&self, inner: S) -> <IoToProxyBridgeIoLayer<C> as Layer<S>>::Service
§fn into_layer(
self,
inner: S,
) -> <IoToProxyBridgeIoLayer<C> as Layer<S>>::Service
fn into_layer( self, inner: S, ) -> <IoToProxyBridgeIoLayer<C> as Layer<S>>::Service
layer but consuming self after the service was created. Read moreAuto Trait Implementations§
impl<C> Freeze for IoToProxyBridgeIoLayer<C>where
C: Freeze,
impl<C> RefUnwindSafe for IoToProxyBridgeIoLayer<C>where
C: RefUnwindSafe,
impl<C> Send for IoToProxyBridgeIoLayer<C>where
C: Send,
impl<C> Sync for IoToProxyBridgeIoLayer<C>where
C: Sync,
impl<C> Unpin for IoToProxyBridgeIoLayer<C>where
C: Unpin,
impl<C> UnsafeUnpin for IoToProxyBridgeIoLayer<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for IoToProxyBridgeIoLayer<C>where
C: UnwindSafe,
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
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