[][src]Struct oui::OuiDatabase

pub struct OuiDatabase { /* fields omitted */ }

OUI Database

Implementations

impl OuiDatabase[src]

pub fn new_from_file(dbfile: &str) -> Result<OuiDatabase, Error>[src]

Create a new database from a Wireshark database file

pub fn new_from_export(data: &[u8]) -> Result<OuiDatabase, Error>[src]

Create a new database from a previously exported Vec<u8>

pub fn export(&self) -> Result<Vec<u8>, Error>[src]

Export the database to a Vec<u8> of bincode bytes

pub fn query_by_mac(
    &self,
    mac_addr: &MacAddress
) -> Result<Option<OuiEntry>, Error>
[src]

Query the database by Eui48::MacAddress

pub fn query_by_str(&self, mac_str: &str) -> Result<Option<OuiEntry>, Error>[src]

Query the database by &str

pub fn len(&self) -> usize[src]

Returns total number of entries in the database as usize

pub fn is_empty(&self) -> bool[src]

Returns true if there are zero entries in the database, or false for 1+ entries

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.