Trait swiss_army_knife::internet_protocol::InternetProtocolAddress[][src]

pub trait InternetProtocolAddress: Default + Debug + Copy + Clone + PartialEq + Eq + PartialOrd + Ord + Hash + Serialize + for<'de> Deserialize<'de> {
    const InclusiveMaximumPrefixLength: u8;
    const AddressFamily: u8;
    const LocalHost: Self;

    fn bytes(&self) -> &[u8];
fn from_bytes(bytes: &[u8]) -> Result<Self, TryFromSliceError>; }
Expand description

An Internet Protocol (IP) version 4 or version 6 address.

Associated Constants

Inclusive aximum prefix (netmask / subnet) length.

Address family, eg AF_INET.

Default value.

Required methods

Bytes.

If const generics were operational in Rust, could return &[u8; Size].

From bytes.

Implementors