Struct netstack3_core::socket::StrictlyZonedAddr
source · pub struct StrictlyZonedAddr<A, W, Z> { /* private fields */ }
Expand description
A ZonedAddr
whose address is Zoned
iff a zone is required.
Any address whose scope can have a zone, will be the Zoned
variant. The
one exception is the loopback address, which is represented as Unzoned
.
This is because the loopback address is allowed to have, but does not
require having, a zone.
§Type Parameters
A: The base IpAddress
type.
W: The Witness
types of the A
.
Z: The zone of A
.
Implementations§
source§impl<A: IpAddress, W: Witness<A> + ScopeableAddress + Copy, Z> StrictlyZonedAddr<A, W, Z>
impl<A: IpAddress, W: Witness<A> + ScopeableAddress + Copy, Z> StrictlyZonedAddr<A, W, Z>
sourcepub fn into_inner(self) -> ZonedAddr<W, Z>
pub fn into_inner(self) -> ZonedAddr<W, Z>
Convert self into the inner ZonedAddr
sourcepub fn into_inner_without_witness(self) -> ZonedAddr<A, Z>
pub fn into_inner_without_witness(self) -> ZonedAddr<A, Z>
Convert self into the inner ZonedAddr
while discarding the witness.
sourcepub fn new_with_zone(addr: W, get_zone: impl FnOnce() -> Z) -> Self
pub fn new_with_zone(addr: W, get_zone: impl FnOnce() -> Z) -> Self
Creates from a specified IP address and an optional zone.
If addr
requires a zone, then get_zone
will be called to provide
the zone.
§Panics
This method panics if the addr
wants a zone and get_zone
will panic
when called.
Methods from Deref<Target = ZonedAddr<W, Z>>§
Trait Implementations§
source§impl<A: Clone, W: Clone, Z: Clone> Clone for StrictlyZonedAddr<A, W, Z>
impl<A: Clone, W: Clone, Z: Clone> Clone for StrictlyZonedAddr<A, W, Z>
source§fn clone(&self) -> StrictlyZonedAddr<A, W, Z>
fn clone(&self) -> StrictlyZonedAddr<A, W, Z>
Returns a copy 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 moresource§impl<A: PartialEq, W: PartialEq, Z: PartialEq> PartialEq for StrictlyZonedAddr<A, W, Z>
impl<A: PartialEq, W: PartialEq, Z: PartialEq> PartialEq for StrictlyZonedAddr<A, W, Z>
source§fn eq(&self, other: &StrictlyZonedAddr<A, W, Z>) -> bool
fn eq(&self, other: &StrictlyZonedAddr<A, W, Z>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<A: Copy, W: Copy, Z: Copy> Copy for StrictlyZonedAddr<A, W, Z>
impl<A: Eq, W: Eq, Z: Eq> Eq for StrictlyZonedAddr<A, W, Z>
impl<A, W, Z> StructuralPartialEq for StrictlyZonedAddr<A, W, Z>
Auto Trait Implementations§
impl<A, W, Z> Freeze for StrictlyZonedAddr<A, W, Z>
impl<A, W, Z> RefUnwindSafe for StrictlyZonedAddr<A, W, Z>
impl<A, W, Z> Send for StrictlyZonedAddr<A, W, Z>
impl<A, W, Z> Sync for StrictlyZonedAddr<A, W, Z>
impl<A, W, Z> Unpin for StrictlyZonedAddr<A, W, Z>
impl<A, W, Z> UnwindSafe for StrictlyZonedAddr<A, W, Z>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
source§fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
Handle a timer firing.