pub enum TlsConfig {
Empty,
Server(Arc<ServerConfig>),
Client(Arc<ClientConfig>),
}
Expand description
传输层安全协议配置
Variants§
Implementations§
Source§impl TlsConfig
impl TlsConfig
pub fn empty() -> Self
pub fn new_server( client_auth_path: &str, is_client_auth: bool, server_certs_path: &str, server_key_path: &str, server_ocsp_path: &str, server_suite: &str, server_versions: &str, server_session_size: usize, is_server_tickets: bool, server_alpns: &str, ) -> IOResult<Self>
pub fn new_client() -> Result<Self, String>
pub fn is_empty(&self) -> bool
pub fn is_server(&self) -> bool
pub fn is_client(&self) -> bool
pub fn all_suites(&self) -> Vec<String>
pub fn all_versions(&self) -> Vec<String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TlsConfig
impl !RefUnwindSafe for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl !UnwindSafe for TlsConfig
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