pub struct OuiDatabase { /* private fields */ }Expand description
OUI Database
Implementations§
Source§impl OuiDatabase
impl OuiDatabase
Sourcepub fn new_from_file<P: AsRef<Path>>(dbfile: P) -> Result<OuiDatabase, Error>
pub fn new_from_file<P: AsRef<Path>>(dbfile: P) -> Result<OuiDatabase, Error>
Create a new database from a Wireshark database file
Sourcepub fn new_from_str(dbstr: &str) -> Result<OuiDatabase, Error>
pub fn new_from_str(dbstr: &str) -> Result<OuiDatabase, Error>
Create a new database from a Wireshark database string
Sourcepub fn new_from_export(data: &[u8]) -> Result<OuiDatabase, Error>
pub fn new_from_export(data: &[u8]) -> Result<OuiDatabase, Error>
Create a new database from a previously exported Vec<u8>
Sourcepub fn export(&self) -> Result<Vec<u8>, Error>
pub fn export(&self) -> Result<Vec<u8>, Error>
Export the database to a Vec<u8> of bincode bytes
Sourcepub fn query_by_mac(
&self,
mac_addr: &MacAddress,
) -> Result<Option<OuiEntry>, Error>
pub fn query_by_mac( &self, mac_addr: &MacAddress, ) -> Result<Option<OuiEntry>, Error>
Query the database by Eui48::MacAddress
Auto Trait Implementations§
impl Freeze for OuiDatabase
impl RefUnwindSafe for OuiDatabase
impl Send for OuiDatabase
impl Sync for OuiDatabase
impl Unpin for OuiDatabase
impl UnwindSafe for OuiDatabase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more