pub struct DhcpServerLease(/* private fields */);Expand description
One entry of the DHCP server’s lease table.
Read them with Iface::dhcpv4_server_leases.
Implementations§
Source§impl DhcpServerLease
impl DhcpServerLease
Sourcepub fn address(&self) -> Ipv4Address
pub fn address(&self) -> Ipv4Address
The leased address.
Sourcepub fn hardware_addr(&self) -> EthernetAddress
pub fn hardware_addr(&self) -> EthernetAddress
The client’s hardware address, from its latest message.
Sourcepub fn client_id(&self) -> Option<&[u8]>
pub fn client_id(&self) -> Option<&[u8]>
The client identifier the client sent, or None if it sent none and is
identified by its hardware address.
Sourcepub fn state(&self) -> DhcpServerLeaseState
pub fn state(&self) -> DhcpServerLeaseState
The state of the lease.
Sourcepub fn expires_at(&self) -> Instant
pub fn expires_at(&self) -> Instant
When the lease stops holding its address.
For an offered lease this is when the unanswered offer lapses, for a bound one the end of the lease, and for a declined one the end of the hold that keeps the address out of the pool. A released lease is already past it. Past this time the entry is only a record: the address is free, and the entry makes a returning client get it again.
Trait Implementations§
Source§impl Clone for DhcpServerLease
impl Clone for DhcpServerLease
Source§fn clone(&self) -> DhcpServerLease
fn clone(&self) -> DhcpServerLease
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DhcpServerLease
impl Debug for DhcpServerLease
Auto Trait Implementations§
impl Freeze for DhcpServerLease
impl RefUnwindSafe for DhcpServerLease
impl Send for DhcpServerLease
impl Sync for DhcpServerLease
impl Unpin for DhcpServerLease
impl UnsafeUnpin for DhcpServerLease
impl UnwindSafe for DhcpServerLease
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