#[non_exhaustive]pub enum ContentType {
ChangeCipherSpec,
Alert,
Handshake,
ApplicationData,
Heartbeat,
Unknown(u8),
}展开描述
此 ContentType 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 ContentType
impl Clone for ContentType
Source§fn clone(&self) -> ContentType
fn clone(&self) -> ContentType
返回值的副本。 更多信息
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 ContentType
impl Debug for ContentType
Source§impl From<ContentType> for u8
impl From<ContentType> for u8
Source§fn from(value: ContentType) -> Self
fn from(value: ContentType) -> Self
从输入类型转换为此类型。
Source§impl PartialEq for ContentType
impl PartialEq for ContentType
impl Copy for ContentType
impl Eq for ContentType
impl StructuralPartialEq for ContentType
自动 Trait 实现§
impl Freeze for ContentType
impl RefUnwindSafe for ContentType
impl Send for ContentType
impl Sync for ContentType
impl Unpin for ContentType
impl UnsafeUnpin for ContentType
impl UnwindSafe for ContentType
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. 更多信息