#[non_exhaustive]pub struct LocalAddresses<'a> {
pub own: Ipv4Addr,
pub broadcast: Ipv4Addr,
pub wildcard: Option<&'a [Ipv4Addr]>,
}Expand description
The addresses a destination is judged against.
It is #[non_exhaustive], so a new kind of address isn’t a breaking
change: outside this crate, build it with LocalAddresses::new and
set wildcard for a socket bound to the wildcard
address.
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.own: Ipv4AddrThe IP address of the node’s own B/IP address.
broadcast: Ipv4AddrThe subnet’s broadcast IP address, or a B/IP-M node’s multicast
group (Annex J.8): the link’s LocalSubnet::broadcast.
A group here makes the group the only broadcast destination: see
Addressed::classify.
wildcard: Option<&'a [Ipv4Addr]>For a socket bound to the wildcard address, the host’s own unicast
addresses: unicast to any of them is the node’s. None for a socket
bound to own.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for LocalAddresses<'a>
impl<'a> Clone for LocalAddresses<'a>
impl<'a> Copy for LocalAddresses<'a>
Source§impl<'a> Debug for LocalAddresses<'a>
impl<'a> Debug for LocalAddresses<'a>
impl<'a> Eq for LocalAddresses<'a>
Source§impl<'a> PartialEq for LocalAddresses<'a>
impl<'a> PartialEq for LocalAddresses<'a>
impl<'a> StructuralPartialEq for LocalAddresses<'a>
Auto Trait Implementations§
impl<'a> Freeze for LocalAddresses<'a>
impl<'a> RefUnwindSafe for LocalAddresses<'a>
impl<'a> Send for LocalAddresses<'a>
impl<'a> Sync for LocalAddresses<'a>
impl<'a> Unpin for LocalAddresses<'a>
impl<'a> UnsafeUnpin for LocalAddresses<'a>
impl<'a> UnwindSafe for LocalAddresses<'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