Skip to main content

NetMask

Struct NetMask 

Source
pub struct NetMask(/* private fields */);

Implementations§

Source§

impl NetMask

Source

pub const MAX: Self = Self::M_64

Source

pub const MIN: Self = Self::M_0

Source

pub const M_0: Self

Source

pub const M_1: Self

Source

pub const M_10: Self

Source

pub const M_11: Self

Source

pub const M_12: Self

Source

pub const M_13: Self

Source

pub const M_14: Self

Source

pub const M_15: Self

Source

pub const M_16: Self

Source

pub const M_17: Self

Source

pub const M_18: Self

Source

pub const M_19: Self

Source

pub const M_2: Self

Source

pub const M_20: Self

Source

pub const M_21: Self

Source

pub const M_22: Self

Source

pub const M_23: Self

Source

pub const M_24: Self

Source

pub const M_25: Self

Source

pub const M_26: Self

Source

pub const M_27: Self

Source

pub const M_28: Self

Source

pub const M_29: Self

Source

pub const M_3: Self

Source

pub const M_30: Self

Source

pub const M_31: Self

Source

pub const M_32: Self

Source

pub const M_33: Self

Source

pub const M_34: Self

Source

pub const M_35: Self

Source

pub const M_36: Self

Source

pub const M_37: Self

Source

pub const M_38: Self

Source

pub const M_39: Self

Source

pub const M_4: Self

Source

pub const M_40: Self

Source

pub const M_41: Self

Source

pub const M_42: Self

Source

pub const M_43: Self

Source

pub const M_44: Self

Source

pub const M_45: Self

Source

pub const M_46: Self

Source

pub const M_47: Self

Source

pub const M_48: Self

Source

pub const M_49: Self

Source

pub const M_5: Self

Source

pub const M_50: Self

Source

pub const M_51: Self

Source

pub const M_52: Self

Source

pub const M_53: Self

Source

pub const M_54: Self

Source

pub const M_55: Self

Source

pub const M_56: Self

Source

pub const M_57: Self

Source

pub const M_58: Self

Source

pub const M_59: Self

Source

pub const M_6: Self

Source

pub const M_60: Self

Source

pub const M_61: Self

Source

pub const M_62: Self

Source

pub const M_63: Self

Source

pub const M_64: Self

Source

pub const M_7: Self

Source

pub const M_8: Self

Source

pub const M_9: Self

Source§

impl NetMask

Source

pub fn bits_fixed(&self) -> u8

Source

pub fn bits_available(&self) -> u8

Source

pub fn into_u64(self) -> u64

Trait Implementations§

Source§

impl Clone for NetMask

Source§

fn clone(&self) -> NetMask

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NetMask

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for NetMask

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for NetMask

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<NetMask> for u8

Source§

fn from(value: NetMask) -> Self

Converts to this type from the input type.
Source§

impl FromStr for NetMask

Source§

type Err = MaskParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for NetMask

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for NetMask

Source§

fn cmp(&self, other: &NetMask) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for NetMask

Source§

fn eq(&self, other: &NetMask) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for NetMask

Source§

fn partial_cmp(&self, other: &NetMask) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for NetMask

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<u8> for NetMask

Source§

type Error = InvalidMask

The type returned in the event of a conversion error.
Source§

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for NetMask

Source§

impl Eq for NetMask

Source§

impl Message for NetMask
where Self: Serialize + Send + 'static,

Source§

impl StructuralPartialEq for NetMask

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,