Enum crab_nat::VersionCode
source · #[repr(u8)]pub enum VersionCode {
NatPmp = 0,
Pcp = 2,
}
Expand description
8-bit version field in the NAT-PMP and PCP headers.
Variants§
NatPmp = 0
NAT-PMP identifies its version with a 0
byte.
Pcp = 2
PCP identifies its version with a 2
byte.
The RFC explicitly states that PCP must use version 2
because non-compliant
devices were created that used 1
before the creation of PCP.
Trait Implementations§
source§impl Debug for VersionCode
impl Debug for VersionCode
source§impl PartialEq for VersionCode
impl PartialEq for VersionCode
source§fn eq(&self, other: &VersionCode) -> bool
fn eq(&self, other: &VersionCode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u8> for VersionCode
impl TryFrom<u8> for VersionCode
§type Error = TryFromPrimitiveError<VersionCode>
type Error = TryFromPrimitiveError<VersionCode>
The type returned in the event of a conversion error.
source§impl TryFromPrimitive for VersionCode
impl TryFromPrimitive for VersionCode
type Primitive = u8
type Error = TryFromPrimitiveError<VersionCode>
const NAME: &'static str = "VersionCode"
fn try_from_primitive( number: Self::Primitive ) -> Result<Self, TryFromPrimitiveError<Self>>
impl StructuralPartialEq for VersionCode
Auto Trait Implementations§
impl Freeze for VersionCode
impl RefUnwindSafe for VersionCode
impl Send for VersionCode
impl Sync for VersionCode
impl Unpin for VersionCode
impl UnwindSafe for VersionCode
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