pub enum Lookup {
Mac(String),
Ip(Ipv4Addr),
}Expand description
What a host is looked up by: an address the device can look up itself.
Variants§
Implementations§
Source§impl Lookup
impl Lookup
Sourcepub fn mac(text: &str) -> Result<Self, InvalidAddress>
pub fn mac(text: &str) -> Result<Self, InvalidAddress>
A lookup by MAC address: six pairs of hex digits, separated by colons or dashes, in any case.
§Errors
InvalidAddress::Mac for anything else.
Sourcepub fn ip(text: &str) -> Result<Self, InvalidAddress>
pub fn ip(text: &str) -> Result<Self, InvalidAddress>
A lookup by IPv4 address, the only kind the device looks up.
§Errors
InvalidAddress::Ip for anything else.
Trait Implementations§
impl Eq for Lookup
impl StructuralPartialEq for Lookup
Auto Trait Implementations§
impl Forget for Lookup
impl Freeze for Lookup
impl Move for Lookup
impl RefUnwindSafe for Lookup
impl Send for Lookup
impl Sync for Lookup
impl Unpin for Lookup
impl UnsafeUnpin for Lookup
impl UnwindSafe for Lookup
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