[][src]Struct asn_db::Record

pub struct Record {
    pub ip: u32,
    pub prefix_len: u8,
    pub as_number: u32,
    pub country: String,
    pub owner: String,
}

Autonomous system number record

Fields

ip: u32

Network base IP address (host byte order)

prefix_len: u8

Network mask prefix in number of bits, e.g. 24 for 255.255.255.0 mask

as_number: u32

Assigned AS number

country: String

Country code of network owner

owner: String

Network owner information

Methods

impl Record[src]

pub fn network(&self) -> Ipv4Net[src]

Get Ipv4Net representation of the network address

Trait Implementations

impl Debug for Record[src]

impl Serialize for Record[src]

impl<'de> Deserialize<'de> for Record[src]

Auto Trait Implementations

impl Send for Record

impl Sync for Record

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<E, C> WrapContext for E[src]

type ContextError = ErrorContext<E, C>

impl<T> ToErrorNoContext for T[src]