Struct Http3Connector
pub struct Http3Connector<E = SharedQuicEndpoint> { /* private fields */ }dns and http-backend and http and quic and std and tcp only.Expand description
Establish HTTP/3 transports over the authenticated QUIC connections of a
QuicConnector, for the common HTTP handshake.
Wrap this connector with Rama’s DNS connector and HTTP connection pool, which checks the
reuse policy published by the QUIC connector. Requests may supply an explicit ALPN offer
containing Config::application_protocol; otherwise it is offered alone and required
after the handshake.
HTTP/3 limits set the QUIC receive budgets.
Where the QUIC connections come from is the QUIC connector’s endpoint connector E: by
default one SharedQuicEndpoint for every connection; a
QuicEndpointConnector over a datagram
connector gives each connection its own socket, such as a UDP tunnel through a proxy.
Proxy routes are served only by an endpoint connector that establishes them.
Implementations§
§impl Http3Connector
impl Http3Connector
pub fn builder(scope: impl Into<WeakScope>) -> Http3ConnectorBuilder
pub fn builder(scope: impl Into<WeakScope>) -> Http3ConnectorBuilder
Configure a connector with default TLS verification and HTTP/3 limits, sharing one managed QUIC endpoint.
§impl<E> Http3Connector<E>
impl<E> Http3Connector<E>
pub fn try_new(
quic: QuicConnector<E>,
config: Config,
) -> Result<Http3Connector<E>, Box<dyn Error + Sync + Send>>where
E: Clone,
pub fn try_new(
quic: QuicConnector<E>,
config: Config,
) -> Result<Http3Connector<E>, Box<dyn Error + Sync + Send>>where
E: Clone,
HTTP/3 over the connections of quic, whose transport gets HTTP/3’s limits and whose
TLS defaults offer Config::application_protocol.
pub fn quic(&self) -> &QuicConnector<E>
pub fn quic(&self) -> &QuicConnector<E>
The QUIC connector below.
pub fn tls_config(&self) -> &TlsClientConfig
pub fn tls_config(&self) -> &TlsClientConfig
Fixed TLS defaults for this connector. Rebuild its pool when these defaults or behavior captured by native TLS hooks change.
pub fn tls_provider(&self) -> &Arc<dyn QuicClientConfigProvider> ⓘ
pub fn tls_provider(&self) -> &Arc<dyn QuicClientConfigProvider> ⓘ
Provider selection used for establishment and TLS pool identity.
Trait Implementations§
§impl<E> Clone for Http3Connector<E>where
E: Clone,
impl<E> Clone for Http3Connector<E>where
E: Clone,
§fn clone(&self) -> Http3Connector<E>
fn clone(&self) -> Http3Connector<E>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<E> Debug for Http3Connector<E>where
E: Debug,
impl<E> Debug for Http3Connector<E>where
E: Debug,
§impl<E> Service<ConnectRequest> for Http3Connector<E>
impl<E> Service<ConnectRequest> for Http3Connector<E>
§type Output = EstablishedClientConnection<Http3Transport, ConnectRequest>
type Output = EstablishedClientConnection<Http3Transport, ConnectRequest>
§type Error = ConnectionError
type Error = ConnectionError
§async fn serve(
&self,
input: ConnectRequest,
) -> Result<<Http3Connector<E> as Service<ConnectRequest>>::Output, <Http3Connector<E> as Service<ConnectRequest>>::Error>
async fn serve( &self, input: ConnectRequest, ) -> Result<<Http3Connector<E> as Service<ConnectRequest>>::Output, <Http3Connector<E> as Service<ConnectRequest>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl<E = SharedQuicEndpoint> !RefUnwindSafe for Http3Connector<E>
impl<E = SharedQuicEndpoint> !UnwindSafe for Http3Connector<E>
impl<E> Forget for Http3Connector<E>
impl<E> Freeze for Http3Connector<E>where
QuicConnector<E>: Freeze,
impl<E> Move for Http3Connector<E>
impl<E> Send for Http3Connector<E>where
QuicConnector<E>: Send,
impl<E> Sync for Http3Connector<E>where
QuicConnector<E>: Sync,
impl<E> Unpin for Http3Connector<E>where
QuicConnector<E>: Unpin,
impl<E> UnsafeUnpin for Http3Connector<E>where
QuicConnector<E>: 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
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<S, Input, Connection> ConnectorService<Input> for Swhere
S: Service<Input, Output = EstablishedClientConnection<Connection, Input>>,
<S as Service<Input>>::Error: Into<ConnectionError>,
Connection: Send + ExtensionsRef,
impl<S, Input, Connection> ConnectorService<Input> for Swhere
S: Service<Input, Output = EstablishedClientConnection<Connection, Input>>,
<S as Service<Input>>::Error: Into<ConnectionError>,
Connection: Send + ExtensionsRef,
§type Connection = Connection
type Connection = Connection
ConnectorService§fn connect(
&self,
input: Input,
) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, ConnectionError>> + Send
fn connect( &self, input: Input, ) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, ConnectionError>> + 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