pub struct TlsConfig {
pub certificate_path: String,
pub private_key_path: String,
}Expand description
TLS material a server needs to terminate a connection.
The certificate and key are stored as filesystem paths and only read when a listener is created, so a configuration can be deserialized, compared and cloned without touching the disk.
The two path fields are part of the public surface: TlsConfig::new is the
documented constructor and applications read back what they configured.
Fields§
§certificate_path: StringPath to the PEM encoded certificate chain presented to clients.
private_key_path: StringPath to the PEM encoded private key matching the leaf certificate.
Implementations§
Source§impl TlsConfig
impl TlsConfig
pub fn get_certificate_path(&self) -> &String
pub fn get_mut_certificate_path(&mut self) -> &mut String
pub fn set_certificate_path(&mut self, val: String) -> &mut Self
pub fn get_private_key_path(&self) -> &String
pub fn get_mut_private_key_path(&mut self) -> &mut String
pub fn set_private_key_path(&mut self, val: String) -> &mut Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TlsConfig
impl<'de> Deserialize<'de> for TlsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TlsConfig
impl StructuralPartialEq for TlsConfig
Auto Trait Implementations§
impl Freeze for TlsConfig
impl RefUnwindSafe for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin for TlsConfig
impl UnwindSafe for TlsConfig
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.