netstack3_core::socket

Struct 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, W, Z> StrictlyZonedAddr<A, W, Z>
where A: IpAddress, W: Witness<A> + ScopeableAddress + Copy,

Source

pub fn into_inner(self) -> ZonedAddr<W, Z>

Convert self into the inner ZonedAddr

Source

pub fn into_inner_without_witness(self) -> ZonedAddr<A, Z>

Convert self into the inner ZonedAddr while discarding the witness.

Source

pub fn new_with_zone( addr: W, get_zone: impl FnOnce() -> Z, ) -> StrictlyZonedAddr<A, W, Z>

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>>§

Source

pub fn addr(&self) -> A
where A: Copy,

Accesses the addr for this ZonedAddr.

Source

pub fn as_ref(&self) -> ZonedAddr<&A, &Z>

Converts from &ZonedAddr<A, Z> to ZonedAddr<&A, &Z>.

Trait Implementations§

Source§

impl<A, W, Z> Clone for StrictlyZonedAddr<A, W, Z>
where A: Clone, W: Clone, Z: Clone,

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<A, W, Z> Debug for StrictlyZonedAddr<A, W, Z>
where A: Debug, W: Debug, Z: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<A, W, Z> Deref for StrictlyZonedAddr<A, W, Z>
where A: IpAddress, W: Witness<A>,

Source§

type Target = ZonedAddr<W, Z>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<StrictlyZonedAddr<A, W, Z> as Deref>::Target

Dereferences the value.
Source§

impl<A, W, Z> Hash for StrictlyZonedAddr<A, W, Z>
where A: Hash, W: Hash, Z: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<A, W, Z> PartialEq for StrictlyZonedAddr<A, W, Z>
where A: PartialEq, W: PartialEq, Z: PartialEq,

Source§

fn eq(&self, other: &StrictlyZonedAddr<A, W, Z>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, W, Z> Copy for StrictlyZonedAddr<A, W, Z>
where A: Copy, W: Copy, Z: Copy,

Source§

impl<A, W, Z> Eq for StrictlyZonedAddr<A, W, Z>
where A: Eq, W: Eq, Z: Eq,

Source§

impl<A, W, Z> StructuralPartialEq for StrictlyZonedAddr<A, W, Z>

Auto Trait Implementations§

§

impl<A, W, Z> Freeze for StrictlyZonedAddr<A, W, Z>
where W: Freeze, Z: Freeze,

§

impl<A, W, Z> RefUnwindSafe for StrictlyZonedAddr<A, W, Z>

§

impl<A, W, Z> Send for StrictlyZonedAddr<A, W, Z>
where W: Send, A: Send, Z: Send,

§

impl<A, W, Z> Sync for StrictlyZonedAddr<A, W, Z>
where W: Sync, A: Sync, Z: Sync,

§

impl<A, W, Z> Unpin for StrictlyZonedAddr<A, W, Z>
where W: Unpin, A: Unpin, Z: Unpin,

§

impl<A, W, Z> UnwindSafe for StrictlyZonedAddr<A, W, Z>
where W: UnwindSafe, A: UnwindSafe, Z: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CC
where Meta: ReceivableFrameMeta<CC, BC>,

Source§

fn receive_frame<B>(&mut self, bindings_ctx: &mut BC, metadata: Meta, frame: B)
where B: BufferMut + Debug,

Receive a frame. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CC
where Meta: SendableFrameMeta<CC, BC>,

Source§

fn send_frame<S>( &mut self, bindings_ctx: &mut BC, metadata: Meta, frame: S, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
where S: Serializer, <S as Serializer>::Buffer: BufferMut,

Send a frame. Read more
Source§

impl<Id, CC, BC> TimerHandler<BC, Id> for CC
where BC: TimerBindingsTypes, Id: HandleableTimer<CC, BC>,

Source§

fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )

Handle a timer firing. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<L, T> UnlockedAccess<L> for T

Source§

type Data = <L as UnlockedAccessMarkerFor<T>>::Data

The type of state being accessed.
Source§

type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l

A guard providing read access to the data.
Source§

fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>

How to access the state.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<B, A> LockBefore<B> for A
where B: LockAfter<A>,