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) -> u16
fn from(value: ProtocolVersion) -> u16
Converts to this type from the input type.
Source§impl From<u16> for ProtocolVersion
impl From<u16> for ProtocolVersion
Source§fn from(value: u16) -> ProtocolVersion
fn from(value: u16) -> ProtocolVersion
Converts to this type from the input type.
Source§impl Hash for ProtocolVersion
impl Hash for ProtocolVersion
Source§impl MlsDecode for ProtocolVersion
impl MlsDecode for ProtocolVersion
fn mls_decode(reader: &mut &[u8]) -> Result<ProtocolVersion, Error>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more