[][src]Trait rtable::prefix::Addressable

pub trait Addressable where
    Self: Clone,
    Self: FromStr,
    Self: ToString,
    Self: Hash,
    Self: Eq,
    Self: Debug
{ fn bit_len() -> u8;
fn empty_new() -> Self;
fn from_slice(s: &[u8]) -> Self;
fn octets_ref(&self) -> &[u8]; fn byte_len() -> u8 { ... } }

Trait Addressable to extend IpAddr.

Required methods

fn bit_len() -> u8

Return address bit length.

fn empty_new() -> Self

Construct address with all 0s.

fn from_slice(s: &[u8]) -> Self

Construct address from slice.

fn octets_ref(&self) -> &[u8]

Return reference of slice to address.

Loading content...

Provided methods

fn byte_len() -> u8

Return address byte length.

Loading content...

Implementations on Foreign Types

impl Addressable for Ipv4Addr[src]

Trait implementation for Ipv4Addr.

fn bit_len() -> u8[src]

Return address bit length.

fn empty_new() -> Self[src]

Construct address with all 0s.

fn from_slice(s: &[u8]) -> Self[src]

Construct address from slice.

fn octets_ref(&self) -> &[u8][src]

Return reference of slice to address.

impl Addressable for Ipv6Addr[src]

Trait implementation for Ipv6Addr.

fn bit_len() -> u8[src]

Return address bit length.

fn empty_new() -> Self[src]

Construct address with all 0s.

fn from_slice(s: &[u8]) -> Self[src]

Construct address from slice.

fn octets_ref(&self) -> &[u8][src]

Return reference of slice to address.

Loading content...

Implementors

Loading content...