Struct aldrin_core::ProtocolVersion
source · pub struct ProtocolVersion { /* private fields */ }
Implementations§
source§impl ProtocolVersion
impl ProtocolVersion
pub const MAJOR: u32 = 1u32
pub const V1_14: Self = _
pub const V1_15: Self = _
pub const MIN: Self = Self::V1_14
pub const MAX: Self = Self::V1_15
pub const fn new(major: u32, minor: u32) -> Result<Self, ProtocolVersionError>
pub const fn major(&self) -> u32
pub const fn minor(&self) -> u32
Trait Implementations§
source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
source§fn clone(&self) -> ProtocolVersion
fn clone(&self) -> ProtocolVersion
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProtocolVersion
impl Debug for ProtocolVersion
source§impl Display for ProtocolVersion
impl Display for ProtocolVersion
source§impl FromStr for ProtocolVersion
impl FromStr for ProtocolVersion
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§fn eq(&self, other: &ProtocolVersion) -> bool
fn eq(&self, other: &ProtocolVersion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ProtocolVersion
impl PartialOrd for ProtocolVersion
source§fn partial_cmp(&self, other: &ProtocolVersion) -> Option<Ordering>
fn partial_cmp(&self, other: &ProtocolVersion) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl 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