Struct IoToProxyBridgeIo
pub struct IoToProxyBridgeIo<S, C = TcpConnector> { /* private fields */ }Implementations§
§impl<S> IoToProxyBridgeIo<S>
impl<S> IoToProxyBridgeIo<S>
pub fn new(
inner: S,
exec: Executor,
target: HostWithPort,
) -> IoToProxyBridgeIo<S>
pub fn new( inner: S, exec: Executor, target: HostWithPort, ) -> IoToProxyBridgeIo<S>
Creates a new IoToProxyBridgeIo service,
which will use 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, inner: S) -> IoToProxyBridgeIo<S>
pub fn extension_proxy_target(exec: Executor, inner: S) -> IoToProxyBridgeIo<S>
Creates a new IoToProxyBridgeIo service,
which expects 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,
pub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Consumes self, returning the underlying service.
§impl<S> IoToProxyBridgeIo<S>
impl<S> IoToProxyBridgeIo<S>
pub fn with_connector<C>(self, connector: C) -> IoToProxyBridgeIo<S, C>
pub fn with_connector<C>(self, connector: C) -> IoToProxyBridgeIo<S, C>
Set a custom “connector” for 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.
Trait Implementations§
§impl<S, C> Clone for IoToProxyBridgeIo<S, C>
impl<S, C> Clone for IoToProxyBridgeIo<S, C>
§fn clone(&self) -> IoToProxyBridgeIo<S, C>
fn clone(&self) -> IoToProxyBridgeIo<S, C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<S, C> Debug for IoToProxyBridgeIo<S, C>
impl<S, C> Debug for IoToProxyBridgeIo<S, C>
§impl<S, Ingress, C> Service<Ingress> for IoToProxyBridgeIo<S, C>where
S: Service<BridgeIo<Ingress, <C as ConnectorService<Request>>::Connection>>,
<S as Service<BridgeIo<Ingress, <C as ConnectorService<Request>>::Connection>>>::Error: Into<Box<dyn Error + Send + Sync>>,
Ingress: Io + ExtensionsRef,
C: ConnectorService<Request>,
<C as ConnectorService<Request>>::Connection: Io + Unpin,
impl<S, Ingress, C> Service<Ingress> for IoToProxyBridgeIo<S, C>where
S: Service<BridgeIo<Ingress, <C as ConnectorService<Request>>::Connection>>,
<S as Service<BridgeIo<Ingress, <C as ConnectorService<Request>>::Connection>>>::Error: Into<Box<dyn Error + Send + Sync>>,
Ingress: Io + ExtensionsRef,
C: ConnectorService<Request>,
<C as ConnectorService<Request>>::Connection: Io + Unpin,
§type Output = <S as Service<BridgeIo<Ingress, <C as ConnectorService<Request>>::Connection>>>::Output
type Output = <S as Service<BridgeIo<Ingress, <C as ConnectorService<Request>>::Connection>>>::Output
§async fn serve(
&self,
ingress: Ingress,
) -> Result<<IoToProxyBridgeIo<S, C> as Service<Ingress>>::Output, <IoToProxyBridgeIo<S, C> as Service<Ingress>>::Error>
async fn serve( &self, ingress: Ingress, ) -> Result<<IoToProxyBridgeIo<S, C> as Service<Ingress>>::Output, <IoToProxyBridgeIo<S, C> as Service<Ingress>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl<S, C> Freeze for IoToProxyBridgeIo<S, C>
impl<S, C> RefUnwindSafe for IoToProxyBridgeIo<S, C>where
S: RefUnwindSafe,
C: RefUnwindSafe,
impl<S, C> Send for IoToProxyBridgeIo<S, C>
impl<S, C> Sync for IoToProxyBridgeIo<S, C>
impl<S, C> Unpin for IoToProxyBridgeIo<S, C>
impl<S, C> UnsafeUnpin for IoToProxyBridgeIo<S, C>where
S: UnsafeUnpin,
C: UnsafeUnpin,
impl<S, C> UnwindSafe for IoToProxyBridgeIo<S, C>where
S: UnwindSafe,
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<S, Input, Connection> ConnectorService<Input> for S
impl<S, Input, Connection> ConnectorService<Input> for S
§type Connection = Connection
type Connection = Connection
ConnectorService§fn connect(
&self,
input: Input,
) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, <S as ConnectorService<Input>>::Error>> + Send
fn connect( &self, input: Input, ) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, <S as ConnectorService<Input>>::Error>> + 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