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.
AddrVec
s 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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
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 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