pub struct ProtocolVersion(/* private fields */);
Expand description
Wrapper type representing a protocol version identifier.
Implementations§
Source§impl ProtocolVersion
impl ProtocolVersion
Sourcepub const MLS_10: ProtocolVersion
pub const MLS_10: ProtocolVersion
MLS version 1.0
Sourcepub const fn new(value: u16) -> ProtocolVersion
pub const fn new(value: u16) -> ProtocolVersion
Protocol version from a raw value, useful for testing.
Sourcepub fn all() -> impl Iterator<Item = ProtocolVersion>
pub fn all() -> impl Iterator<Item = ProtocolVersion>
An iterator over all of the defined MLS versions.
Trait Implementations§
Source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
Source§fn clone(&self) -> ProtocolVersion
fn clone(&self) -> ProtocolVersion
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProtocolVersion
impl Debug for ProtocolVersion
Source§impl Deref for ProtocolVersion
impl Deref for ProtocolVersion
Source§impl From<ProtocolVersion> for u16
impl From<ProtocolVersion> for u16
Source§fn from(value: ProtocolVersion) -> Self
fn from(value: ProtocolVersion) -> Self
Converts to this type from the input type.
Source§impl From<u16> for ProtocolVersion
impl From<u16> for ProtocolVersion
Source§impl Hash for ProtocolVersion
impl Hash for ProtocolVersion
Source§impl MlsDecode for ProtocolVersion
impl MlsDecode for ProtocolVersion
Source§impl MlsEncode for ProtocolVersion
impl MlsEncode for ProtocolVersion
Source§impl MlsSize for ProtocolVersion
impl MlsSize for ProtocolVersion
fn mls_encoded_len(&self) -> usize
Source§impl Ord for ProtocolVersion
impl Ord for ProtocolVersion
Source§fn cmp(&self, other: &ProtocolVersion) -> Ordering
fn cmp(&self, other: &ProtocolVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
Source§impl PartialOrd for ProtocolVersion
impl PartialOrd for ProtocolVersion
impl Copy for ProtocolVersion
impl Eq for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
Auto Trait Implementations§
impl Freeze for ProtocolVersion
impl RefUnwindSafe for ProtocolVersion
impl Send for ProtocolVersion
impl Sync for ProtocolVersion
impl Unpin for ProtocolVersion
impl UnwindSafe for ProtocolVersion
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