Trait Length

Source
pub trait Length:
    Copy
    + Clone
    + Debug
    + Display
    + Hash
    + Ord
    + Add<Output = Self>
    + Sub<Output = Self>
    + Into<usize>
    + TryFrom<usize> {
    const ZERO: Self;
    const ONE: Self;
}
Expand description

Underlying integer-like type used to represent an IP prefix-length.

Required Associated Constants§

Source

const ZERO: Self

Additive identity value.

Source

const ONE: Self

Additive unit value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Length for u8

Source§

const ZERO: Self = 0u8

Source§

const ONE: Self = 1u8

Implementors§