pub struct ProtocolVersion {
pub major: u16,
pub minor: u16,
pub features: u32,
}Fields§
§major: u16§minor: u16§features: u32Implementations§
Source§impl ProtocolVersion
impl ProtocolVersion
pub const fn new(major: u16, minor: u16, features: u32) -> Self
pub const fn major(&self) -> u16
pub const fn minor(&self) -> u16
pub const fn features(&self) -> u32
pub fn has_feature(&self, feature: u32) -> bool
pub fn enable_feature(&mut self, feature: u32)
pub fn disable_feature(&mut self, feature: u32)
pub fn is_v1_0(&self) -> bool
pub fn is_compatible_with(&self, other: &ProtocolVersion) -> bool
pub fn compare(&self, other: &ProtocolVersion) -> i32
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§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 Hash for ProtocolVersion
impl Hash for ProtocolVersion
Source§impl PartialEq for ProtocolVersion
impl PartialEq 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 UnsafeUnpin 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