logo
pub struct RustlsConfig { /* private fields */ }
Available on crate feature rustls only.
Expand description

Builder to set the configuration for the Tls server.

Implementations

Create new RustlsConfig

sets the Tls key via File Path, returns Error::IoError if the file cannot be open

sets the Tls key via bytes slice

Specify the file path for the TLS certificate to use.

sets the Tls certificate via bytes slice

Sets the trust anchor for optional Tls client authentication via file path.

Anonymous and authenticated clients will be accepted. If no trust anchor is provided by any of the client_auth_ methods, then client authentication is disabled by default.

Sets the trust anchor for optional Tls client authentication via bytes slice.

Anonymous and authenticated clients will be accepted. If no trust anchor is provided by any of the client_auth_ methods, then client authentication is disabled by default.

Sets the trust anchor for required Tls client authentication via file path.

Only authenticated clients will be accepted. If no trust anchor is provided by any of the client_auth_ methods, then client authentication is disabled by default.

Sets the trust anchor for required Tls client authentication via bytes slice.

Only authenticated clients will be accepted. If no trust anchor is provided by any of the client_auth_ methods, then client authentication is disabled by default.

Sets the DER-encoded OCSP response

ServerConfig

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more