Struct ClientConfig
#[non_exhaustive]pub struct ClientConfig { /* private fields */ }quic and std only.Expand description
Configuration for outgoing connections
Default values should be suitable for most internet applications.
Implementations§
§impl ClientConfig
impl ClientConfig
pub fn with_preferred_address_policy(
self,
policy: PreferredAddressPolicy,
) -> ClientConfig
pub fn with_preferred_address_policy( self, policy: PreferredAddressPolicy, ) -> ClientConfig
What to do with the address a server advertises as preferred (RFC 9000 §9.6).
Defaults to PreferredAddressPolicy::Migrate: the address advertised for the family
in use is probed once the handshake is confirmed, and the connection moves there with
the connection ID the server bound to it as soon as a probe is answered.
pub fn set_preferred_address_policy(
&mut self,
policy: PreferredAddressPolicy,
) -> &mut ClientConfig
pub fn set_preferred_address_policy( &mut self, policy: PreferredAddressPolicy, ) -> &mut ClientConfig
What to do with the address a server advertises as preferred (RFC 9000 §9.6).
Defaults to PreferredAddressPolicy::Migrate: the address advertised for the family
in use is probed once the handshake is confirmed, and the connection moves there with
the connection ID the server bound to it as soon as a probe is answered.
pub fn with_transport_config(
self,
transport: Arc<TransportConfig>,
) -> ClientConfig
pub fn with_transport_config( self, transport: Arc<TransportConfig>, ) -> ClientConfig
Set a custom TransportConfig
pub fn set_transport_config(
&mut self,
transport: Arc<TransportConfig>,
) -> &mut ClientConfig
pub fn set_transport_config( &mut self, transport: Arc<TransportConfig>, ) -> &mut ClientConfig
Set a custom TransportConfig
pub fn with_token_store(self, store: Arc<dyn TokenStore>) -> ClientConfig
pub fn with_token_store(self, store: Arc<dyn TokenStore>) -> ClientConfig
Set a custom TokenStore
Defaults to TokenMemoryCache, which is suitable for most internet applications.
pub fn set_token_store(
&mut self,
store: Arc<dyn TokenStore>,
) -> &mut ClientConfig
pub fn set_token_store( &mut self, store: Arc<dyn TokenStore>, ) -> &mut ClientConfig
Set a custom TokenStore
Defaults to TokenMemoryCache, which is suitable for most internet applications.
pub fn with_version(self, version: u32) -> ClientConfig
pub fn with_version(self, version: u32) -> ClientConfig
Set the QUIC version to use
pub fn set_version(&mut self, version: u32) -> &mut ClientConfig
pub fn set_version(&mut self, version: u32) -> &mut ClientConfig
Set the QUIC version to use
§impl ClientConfig
impl ClientConfig
pub fn try_from_rama_tls(
config: &TlsClientConfig,
options: TlsOptions,
) -> Result<ClientConfig, TlsConfigError>
Available on crate feature rustls and (crate features aws-lc or ring) only.
pub fn try_from_rama_tls( config: &TlsClientConfig, options: TlsOptions, ) -> Result<ClientConfig, TlsConfigError>
rustls and (crate features aws-lc or ring) only.Build a client configuration from the common Rama TLS client configuration: the peer identity to trust, the protocols to offer and everything else TLS decides, with the provider chosen by this crate’s features.
The destination address is not part of it. A connection is made to an address with
Endpoint::connect_with, and the identity it must prove
comes from here and from the server name given there.
Trait Implementations§
§impl Clone for ClientConfig
impl Clone for ClientConfig
§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ClientConfig
impl !UnwindSafe for ClientConfig
impl Freeze for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
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<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