ipcheck_rs

Trait ToNetwork

Source
pub trait ToNetwork<N: IpNet> {
    // Required method
    fn to_network(&self) -> N;
}
Expand description

Anything that can be converted to IpNet.

Due to limitation of Rust’s type system, this trait is only implemented for some concrete types.

Required Methods§

Source

fn to_network(&self) -> N

Implementations on Foreign Types§

Source§

impl ToNetwork<Ipv4Net> for u32

Source§

impl ToNetwork<Ipv4Net> for Ipv4Addr

Source§

impl ToNetwork<Ipv4Net> for Ipv4Net

Source§

impl ToNetwork<Ipv4Net> for [u8; 4]

Source§

impl ToNetwork<Ipv6Net> for u128

Source§

impl ToNetwork<Ipv6Net> for Ipv6Addr

Source§

impl ToNetwork<Ipv6Net> for Ipv6Net

Source§

impl ToNetwork<Ipv6Net> for [u8; 16]

Source§

impl ToNetwork<Ipv6Net> for [u16; 8]

Implementors§