Struct mac_oui::Oui [−][src]
Implementations
impl Oui
[src]
pub fn default() -> Result<Oui, String>
[src]
Loads the default oui csv database
Example
use mac_oui::Oui; fn main() { let db = Oui::default(); assert!(db.is_ok()); }
pub fn from_csv_file<P: AsRef<Path>>(oui_csv: P) -> Result<Oui, String>
[src]
Loads a database from the given path.
The default database is loaded from:
https://macaddress.io/database-download/csv
Example
use mac_oui::Oui; fn main () { let db = Oui::from_csv_file("assets/oui.csv"); assert!(db.is_ok()) }
pub fn lookup_by_mac(&self, mac_addr: &str) -> Result<Option<&Entry>, String>
[src]
Lookup for a Manufacturer Name based upon the given MAC Address
pub fn lookup_by_manufacturer(
&self,
manufacturer_name: &str
) -> Result<Option<&Vec<Entry>>, String>
[src]
&self,
manufacturer_name: &str
) -> Result<Option<&Vec<Entry>>, String>
Lookup for the MAC Address Reference based upon the given Manufacturer Name
pub fn get_unique_manufacturers(&self) -> Result<Vec<String>, String>
[src]
Get a list of Manufacturers present in the database
pub fn get_unique_ouis(&self) -> Result<Vec<String>, String>
[src]
Get a list of MAC OUI references present in the database
pub fn get_total_records(&self) -> i32
[src]
Get total records in the database
Auto Trait Implementations
impl RefUnwindSafe for Oui
impl Send for Oui
impl Sync for Oui
impl Unpin for Oui
impl UnwindSafe for Oui
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,