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.
Sourcepub fn new_unzoned_or_panic(addr: W) -> Self
pub fn new_unzoned_or_panic(addr: W) -> Self
Creates the unzoned variant, or panics if the addr’s scope needs a zone.
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>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more