#[non_exhaustive]pub struct Built<T> {
pub config: T,
pub policy: Policy,
}Expand description
A built configuration and the Policy it was built under, so a host can surface the
settings that differ from the default policy’s with non_defaults.
Nothing is printed by this crate.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.config: TThe configuration.
policy: PolicyThe policy the configuration was built under. Its settings that differ from the default
policy’s are non_defaults(), named as Policy::non_defaults names them
(tls_versions); empty under the default policy.
Implementations§
Source§impl<T> Built<T>where
Policy: Describe + Inspect,
impl<T> Built<T>where
Policy: Describe + Inspect,
Sourcepub fn non_defaults(&self) -> Vec<NonDefault>
pub fn non_defaults(&self) -> Vec<NonDefault>
Every setting that differs from its default.
Trait Implementations§
Source§impl<T> Configured for Built<T>where
Policy: Describe + Inspect,
impl<T> Configured for Built<T>where
Policy: Describe + Inspect,
Source§fn configured(&self) -> &dyn Inspect
fn configured(&self) -> &dyn Inspect
Inspect].§fn non_defaults(&self) -> Vec<NonDefault>
fn non_defaults(&self) -> Vec<NonDefault>
Source§impl TryFrom<ClientParts<'_>> for Built<ClientConfig>
impl TryFrom<ClientParts<'_>> for Built<ClientConfig>
Source§fn try_from(parts: ClientParts<'_>) -> Result<Self, PeerError>
fn try_from(parts: ClientParts<'_>) -> Result<Self, PeerError>
The configuration.
§Errors
PeerError::Unsupported for CA trust; PeerError::Policy when the policy asks for
something the ring provider or this build cannot do; PeerError::Io or
PeerError::Certificate when the roots cannot be loaded; PeerError::Certificate or
PeerError::Tls when the configuration cannot be built.
Source§impl TryFrom<ServerParts<'_>> for Built<ServerConfig>
impl TryFrom<ServerParts<'_>> for Built<ServerConfig>
Source§fn try_from(parts: ServerParts<'_>) -> Result<Self, PeerError>
fn try_from(parts: ServerParts<'_>) -> Result<Self, PeerError>
The configuration, shared by every connection it accepts.
§Errors
PeerError::Certificate, PeerError::TrustPattern, PeerError::CaFile,
PeerError::Unsupported for trust only clients apply, PeerError::Policy or
PeerError::Tls when the configuration cannot be built.