#[non_exhaustive]pub enum ProtocolVersion {
SSLv2,
SSLv3,
TLSv1_0,
TLSv1_1,
TLSv1_2,
TLSv1_3,
DTLSv1_0,
DTLSv1_2,
DTLSv1_3,
Unknown(u16),
}展开描述
此 ProtocolVersion TLS 协议枚举。 Values in this enum are taken
从 the various RFCs covering TLS, 并 are listed by IANA.
此 Unknown item is 用 when processing unrecognised ordinals.
变体 (Non-exhaustive)§
This enum is marked as non-exhaustive
非穷尽枚举未来可能添加新的变体。因此,在对非穷尽枚举的变体进行模式匹配时,必须额外增加一个通配符分支以涵盖未来的新变体。
实现§
Trait 实现§
Source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
Source§fn clone(&self) -> ProtocolVersion
fn clone(&self) -> ProtocolVersion
返回值的副本。 更多信息
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment 从
source. 更多信息Source§impl Debug for ProtocolVersion
impl Debug for ProtocolVersion
Source§impl From<ProtocolVersion> for u16
impl From<ProtocolVersion> for u16
Source§fn from(value: ProtocolVersion) -> Self
fn from(value: ProtocolVersion) -> Self
从输入类型转换为此类型。
Source§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
impl Copy for ProtocolVersion
impl Eq for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
自动 Trait 实现§
impl Freeze for ProtocolVersion
impl RefUnwindSafe for ProtocolVersion
impl Send for ProtocolVersion
impl Sync for ProtocolVersion
impl Unpin for ProtocolVersion
impl UnsafeUnpin for ProtocolVersion
impl UnwindSafe for ProtocolVersion
Blanket 实现§
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 从 an owned value. 更多信息