#[non_exhaustive]pub struct ServerOptions<'a> {
pub ip: Ipv4Addr,
pub gateways: &'a [Ipv4Addr],
pub subnet: Option<Ipv4Addr>,
pub dns: &'a [Ipv4Addr],
pub captive_url: Option<&'a str>,
pub lease_duration_secs: u32,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ip: Ipv4Addr§gateways: &'a [Ipv4Addr]§subnet: Option<Ipv4Addr>§dns: &'a [Ipv4Addr]§captive_url: Option<&'a str>§lease_duration_secs: u32Implementations§
Source§impl<'a> ServerOptions<'a>
impl<'a> ServerOptions<'a>
pub fn new(ip: Ipv4Addr, gw_buf: Option<&'a mut [Ipv4Addr; 1]>) -> Self
pub fn process<'o>(&self, request: &'o Packet<'o>) -> Option<Action<'o>>
pub fn offer( &self, request: &Packet<'_>, yiaddr: Ipv4Addr, opt_buf: &'a mut [DhcpOption<'a>], ) -> Packet<'a>
pub fn ack_nak( &self, request: &Packet<'_>, ip: Option<Ipv4Addr>, opt_buf: &'a mut [DhcpOption<'a>], ) -> Packet<'a>
Trait Implementations§
Source§impl<'a> Clone for ServerOptions<'a>
impl<'a> Clone for ServerOptions<'a>
Source§fn clone(&self) -> ServerOptions<'a>
fn clone(&self) -> ServerOptions<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ServerOptions<'a>
impl<'a> RefUnwindSafe for ServerOptions<'a>
impl<'a> Send for ServerOptions<'a>
impl<'a> Sync for ServerOptions<'a>
impl<'a> Unpin for ServerOptions<'a>
impl<'a> UnwindSafe for ServerOptions<'a>
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