pub struct Config(/* private fields */);
Expand description
TLS Config container
This object is reference counted pointer so it can be cloned safely.
It can be applied when listening or connecting.
Implementations§
Source§impl Config
impl Config
Sourcepub fn client() -> Option<Self>
pub fn client() -> Option<Self>
Creates client configuration.
Returns None
when cannot allocate memory
Sourcepub fn server() -> Option<Self>
pub fn server() -> Option<Self>
Creates server configuration.
Returns None
when cannot allocate memory
Sourcepub fn auth_mode(&self, mode: Auth) -> Result<(), ErrorCode>
pub fn auth_mode(&self, mode: Auth) -> Result<(), ErrorCode>
Sets Auth
mode of the configuration
Defaults:
- None for server side (listener)
- Required for client side (connecting)
Sourcepub fn versions(&self, min: Version, max: Version) -> Result<(), ErrorCode>
pub fn versions(&self, min: Version, max: Version) -> Result<(), ErrorCode>
Sets range of supported TLS Version
s
Sourcepub fn server_name(&self, name: &str) -> Result<(), ErrorCode>
pub fn server_name(&self, name: &str) -> Result<(), ErrorCode>
Sets server name
for the client connection
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl !Send for Config
impl !Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
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