pub struct Vendor {
reader: Option<Reader<File>>,
}Expand description
Look up MAC-address vendors in an IEEE OUI CSV database.
An OUI is the 24-bit prefix assigned to a hardware vendor. The reader is optional so scans can continue when the database file is unavailable.
Fields§
§reader: Option<Reader<File>>Implementations§
Source§impl Vendor
impl Vendor
Sourcepub fn new(path: &str) -> Self
pub fn new(path: &str) -> Self
Create a resolver for the database at path.
An unavailable file leaves the resolver disabled instead of failing the network scan.
Sourcepub fn has_vendor_db(&self) -> bool
pub fn has_vendor_db(&self) -> bool
Return whether the CSV database was opened successfully.
Sourcepub fn search_by_mac(&mut self, mac_address: &MacAddr) -> Option<String>
pub fn search_by_mac(&mut self, mac_address: &MacAddr) -> Option<String>
Find the vendor associated with a MAC address, if present.
Auto Trait Implementations§
impl Freeze for Vendor
impl RefUnwindSafe for Vendor
impl Send for Vendor
impl Sync for Vendor
impl Unpin for Vendor
impl UnsafeUnpin for Vendor
impl UnwindSafe for Vendor
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