Struct ConnectionProfileInput
pub struct ConnectionProfileInput { /* private fields */ }Available on crate features
std and ua only.Expand description
Original request inputs retained while a native connector resolves final endpoint facts.
Implementations§
§impl ConnectionProfileInput
impl ConnectionProfileInput
pub fn new(
input: &(impl AuthorityInputExt + ProtocolInputExt + ExtensionsRef),
) -> ConnectionProfileInput
pub fn new( input: &(impl AuthorityInputExt + ProtocolInputExt + ExtensionsRef), ) -> ConnectionProfileInput
Snapshot caller inputs before profile settings overwrite them.
pub fn selection_for_ech(
&self,
original: &ConnectionSelection,
ech_ready: bool,
) -> Result<ConnectionSelection, Box<dyn Error + Sync + Send>>
pub fn selection_for_ech( &self, original: &ConnectionSelection, ech_ready: bool, ) -> Result<ConnectionSelection, Box<dyn Error + Sync + Send>>
Re-prepare the same profile and draw for the final endpoint readiness.
Trait Implementations§
§impl AuthorityInputExt for ConnectionProfileInput
impl AuthorityInputExt for ConnectionProfileInput
The input’s own target (
host[:port]), never resolved from forwarded context: what
a connector dials, names in TLS SNI and keys its pool by.§fn host_as_domain(&self) -> Option<Domain>
fn host_as_domain(&self) -> Option<Domain>
The authority host as a
Domain, or None if absent or not a domain
(e.g. an IP literal).Resolve the logical authority with its explicit port, the application
protocol’s default port, or finally
fallback. Read moreSelf::authority_with_default_port for the target: the
target protocol’s default port, then fallback.§impl Debug for ConnectionProfileInput
impl Debug for ConnectionProfileInput
§impl ExtensionsRef for ConnectionProfileInput
impl ExtensionsRef for ConnectionProfileInput
§fn extensions(&self) -> &Extensions
fn extensions(&self) -> &Extensions
Get reference to the underlying
Extensions store§impl ProtocolInputExt for ConnectionProfileInput
impl ProtocolInputExt for ConnectionProfileInput
§fn protocol(&self) -> Option<&Protocol>
fn protocol(&self) -> Option<&Protocol>
The application protocol, or
None if it can’t be determined. Read more§fn target_protocol(&self) -> Option<&Protocol>
fn target_protocol(&self) -> Option<&Protocol>
The input’s own application protocol, never resolved from forwarded context.
§fn protocol_default_port(&self) -> Option<u16>
fn protocol_default_port(&self) -> Option<u16>
The default port of the resolved
Protocol (e.g. 443 for HTTPS), or
None if the protocol is unknown or portless.Auto Trait Implementations§
impl !Freeze for ConnectionProfileInput
impl !RefUnwindSafe for ConnectionProfileInput
impl !UnwindSafe for ConnectionProfileInput
impl Forget for ConnectionProfileInput
impl Move for ConnectionProfileInput
impl Send for ConnectionProfileInput
impl Sync for ConnectionProfileInput
impl Unpin for ConnectionProfileInput
impl UnsafeUnpin for ConnectionProfileInputwhere
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<Node> is !null: UnsafeUnpin,
PhantomData<ArcInner<Node>>: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> ConnectorTargetInputExt for T
impl<T> ConnectorTargetInputExt for T
§fn connector_target(&self) -> Option<HostWithPort>
fn connector_target(&self) -> Option<HostWithPort>
The
host:port to connect to: the authority’s port if set, else the
protocol’s default port. None when no host (or no port) resolves. Read more§fn connector_target_with_default_port(
&self,
default_port: u16,
) -> Option<HostWithPort>
fn connector_target_with_default_port( &self, default_port: u16, ) -> Option<HostWithPort>
Like
connector_target but with default_port as
the ultimate fallback (ConnectorTarget → authority port → protocol default → default_port),
so it yields Some whenever an authority resolves at all. Read more§impl<T> ForwardedClientExt for Twhere
T: ExtensionsRef + ?Sized,
impl<T> ForwardedClientExt for Twhere
T: ExtensionsRef + ?Sized,
§fn trusted_forwarded(&self) -> Option<&Forwarded>
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>
fn forwarded_client(&self) -> Option<&ForwardedElement>
The element describing the client.
§fn forwarded_client_ip(&self) -> Option<IpAddr>
fn forwarded_client_ip(&self) -> Option<IpAddr>
The client’s IP, from its
for node.§fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>
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>
fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>
The host the client asked for.
§fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
The protocol the client used.
§fn forwarded_client_version(&self) -> Option<ForwardedVersion>
fn forwarded_client_version(&self) -> Option<ForwardedVersion>
The HTTP version the client used.
§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> ⓘ
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 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> ⓘ
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
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
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>
Create a new
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more