pub enum AddrVec<I: Ip, D, A: SocketMapAddrSpec + ?Sized> {
Listen(ListenerAddr<ListenerIpAddr<I::Addr, A::LocalIdentifier>, D>),
Conn(ConnAddr<ConnIpAddr<I::Addr, A::LocalIdentifier, A::RemoteIdentifier>, D>),
}Expand description
An “address vector” type that can hold any address in a SocketMap.
This is a “vector” in the mathematical sense, in that it denotes an address in a space. Here, the space is the possible addresses to which a socket receiving IP packets can be bound.
AddrVecs are used as keys for the SocketMap type. Since an incoming
packet can match more than one address, for each incoming packet there is a
set of possible AddrVec keys whose entries (sockets) in a SocketMap
might receive the packet.
This set of keys can be ordered by precedence as described in the
documentation for AddrVecIter. Calling IterShadows::iter_shadows on
an instance will produce the sequence of addresses it has precedence over.
Variants§
Listen(ListenerAddr<ListenerIpAddr<I::Addr, A::LocalIdentifier>, D>)
Conn(ConnAddr<ConnIpAddr<I::Addr, A::LocalIdentifier, A::RemoteIdentifier>, D>)
Trait Implementations§
Source§impl<I: Ip, D, A: SocketMapAddrSpec> From<ConnAddr<ConnIpAddrInner<SocketIpAddr<<I as Ip>::Addr>, <A as SocketMapAddrSpec>::LocalIdentifier, <A as SocketMapAddrSpec>::RemoteIdentifier>, D>> for AddrVec<I, D, A>
impl<I: Ip, D, A: SocketMapAddrSpec> From<ConnAddr<ConnIpAddrInner<SocketIpAddr<<I as Ip>::Addr>, <A as SocketMapAddrSpec>::LocalIdentifier, <A as SocketMapAddrSpec>::RemoteIdentifier>, D>> for AddrVec<I, D, A>
Source§fn from(
conn: ConnAddr<ConnIpAddr<I::Addr, A::LocalIdentifier, A::RemoteIdentifier>, D>,
) -> Self
fn from( conn: ConnAddr<ConnIpAddr<I::Addr, A::LocalIdentifier, A::RemoteIdentifier>, D>, ) -> Self
Converts to this type from the input type.
Source§impl<I: Ip, D, A: SocketMapAddrSpec> From<ListenerAddr<ListenerIpAddr<<I as Ip>::Addr, <A as SocketMapAddrSpec>::LocalIdentifier>, D>> for AddrVec<I, D, A>
impl<I: Ip, D, A: SocketMapAddrSpec> From<ListenerAddr<ListenerIpAddr<<I as Ip>::Addr, <A as SocketMapAddrSpec>::LocalIdentifier>, D>> for AddrVec<I, D, A>
Source§fn from(
listener: ListenerAddr<ListenerIpAddr<I::Addr, A::LocalIdentifier>, D>,
) -> Self
fn from( listener: ListenerAddr<ListenerIpAddr<I::Addr, A::LocalIdentifier>, D>, ) -> Self
Converts to this type from the input type.
Source§impl<I: Ip, D: DeviceIdentifier, A: SocketMapAddrSpec> IterShadows for AddrVec<I, D, A>
impl<I: Ip, D: DeviceIdentifier, A: SocketMapAddrSpec> IterShadows for AddrVec<I, D, A>
Source§type IterShadows = AddrVecIter<I, D, A>
type IterShadows = AddrVecIter<I, D, A>
The iterator returned by
iter_shadows.Source§fn iter_shadows(&self) -> Self::IterShadows
fn iter_shadows(&self) -> Self::IterShadows
Produces the iterator for shadow values.
Source§impl<I: Ip, D, A: SocketMapAddrSpec + ?Sized> PartialEq for AddrVec<I, D, A>where
D: PartialEq,
impl<I: Ip, D, A: SocketMapAddrSpec + ?Sized> PartialEq for AddrVec<I, D, A>where
D: PartialEq,
Source§impl<I: Ip, D: DeviceIdentifier, A: SocketMapAddrSpec, S: SocketMapStateSpec + ?Sized> Tagged<AddrVec<I, D, A>> for Bound<S>
impl<I: Ip, D: DeviceIdentifier, A: SocketMapAddrSpec, S: SocketMapStateSpec + ?Sized> Tagged<AddrVec<I, D, A>> for Bound<S>
impl<I: Ip, D, A: SocketMapAddrSpec + ?Sized> Eq for AddrVec<I, D, A>where
D: Eq,
Auto Trait Implementations§
impl<I, D, A> Freeze for AddrVec<I, D, A>where
<A as SocketMapAddrSpec>::LocalIdentifier: Freeze,
D: Freeze,
<A as SocketMapAddrSpec>::RemoteIdentifier: Freeze,
<I as Ip>::Addr: Freeze,
A: ?Sized,
impl<I, D, A> RefUnwindSafe for AddrVec<I, D, A>where
<A as SocketMapAddrSpec>::LocalIdentifier: RefUnwindSafe,
D: RefUnwindSafe,
<A as SocketMapAddrSpec>::RemoteIdentifier: RefUnwindSafe,
<I as Ip>::Addr: RefUnwindSafe,
A: ?Sized,
impl<I, D, A> Send for AddrVec<I, D, A>
impl<I, D, A> Sync for AddrVec<I, D, A>
impl<I, D, A> Unpin for AddrVec<I, D, A>where
<A as SocketMapAddrSpec>::LocalIdentifier: Unpin,
D: Unpin,
<A as SocketMapAddrSpec>::RemoteIdentifier: Unpin,
<I as Ip>::Addr: Unpin,
A: ?Sized,
impl<I, D, A> UnwindSafe for AddrVec<I, D, A>where
<A as SocketMapAddrSpec>::LocalIdentifier: UnwindSafe,
D: UnwindSafe,
<A as SocketMapAddrSpec>::RemoteIdentifier: UnwindSafe,
<I as Ip>::Addr: UnwindSafe,
A: ?Sized,
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
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
Compare self to
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>
Converts
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>
Converts
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
fn send_frame<S>( &mut self, bindings_ctx: &mut BC, metadata: Meta, frame: S, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
Send a frame. Read more
Source§impl<BC, S, Meta, DeviceId> SendableFrameMeta<FakeCoreCtx<S, Meta, DeviceId>, BC> for Meta
impl<BC, S, Meta, DeviceId> SendableFrameMeta<FakeCoreCtx<S, Meta, DeviceId>, BC> for Meta
Source§fn send_meta<SS>(
self,
core_ctx: &mut FakeCoreCtx<S, Meta, DeviceId>,
bindings_ctx: &mut BC,
frame: SS,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, SS>>
fn send_meta<SS>( self, core_ctx: &mut FakeCoreCtx<S, Meta, DeviceId>, bindings_ctx: &mut BC, frame: SS, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, SS>>
Sends this frame metadata to the provided contexts.
Source§impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
Source§fn send_meta<S>(
self,
core_ctx: &mut FakeFrameCtx<Meta>,
_bindings_ctx: &mut BC,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
fn send_meta<S>( self, core_ctx: &mut FakeFrameCtx<Meta>, _bindings_ctx: &mut BC, frame: S, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
Sends this frame metadata to the provided contexts.
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more