#[non_exhaustive]pub struct NewInterfaceAddress {
pub interface_id: Id<Interface>,
pub address: Network,
pub broadcast: Option<Ipv4Address>,
}Expand description
Intent to assign an IP address to an interface.
This is intentionally distinct from InterfaceAddress: callers do not
manufacture an InterfaceAddressId, and the backend may report derived
attributes after creation. broadcast is meaningful only for IPv4; when
omitted, the platform selects its normal broadcast behaviour. Point-to-
point peers, lifetimes, scope, and platform-specific flags are reserved
for a future extension rather than silently guessed here.
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.interface_id: Id<Interface>The interface receiving the address.
address: NetworkThe requested address and prefix length.
broadcast: Option<Ipv4Address>An optional explicit IPv4 broadcast address.
Implementations§
Source§impl NewInterfaceAddress
impl NewInterfaceAddress
pub fn new(interface_id: Id<Interface>, address: Network) -> NewInterfaceAddress
pub fn with_broadcast(self, broadcast: Ipv4Address) -> NewInterfaceAddress
Trait Implementations§
Source§impl Clone for NewInterfaceAddress
impl Clone for NewInterfaceAddress
Source§fn clone(&self) -> NewInterfaceAddress
fn clone(&self) -> NewInterfaceAddress
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 NewInterfaceAddress
impl Debug for NewInterfaceAddress
impl Eq for NewInterfaceAddress
Source§impl Hash for NewInterfaceAddress
impl Hash for NewInterfaceAddress
Source§impl PartialEq for NewInterfaceAddress
impl PartialEq for NewInterfaceAddress
impl StructuralPartialEq for NewInterfaceAddress
Auto Trait Implementations§
impl Freeze for NewInterfaceAddress
impl RefUnwindSafe for NewInterfaceAddress
impl Send for NewInterfaceAddress
impl Sync for NewInterfaceAddress
impl Unpin for NewInterfaceAddress
impl UnsafeUnpin for NewInterfaceAddress
impl UnwindSafe for NewInterfaceAddress
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