pub enum DualStackLocalIp<I: DualStackIpExt, D> {
ThisStack(ZonedAddr<SocketIpAddr<I::Addr>, D>),
OtherStack(Option<ZonedAddr<SocketIpAddr<<I::OtherVersion as Ip>::Addr>, D>>),
}
Expand description
A local IP address that’s either in the current stack or the other stack.
Variants§
ThisStack(ZonedAddr<SocketIpAddr<I::Addr>, D>)
OtherStack(Option<ZonedAddr<SocketIpAddr<<I::OtherVersion as Ip>::Addr>, D>>)
Implementations§
Source§impl<I: SocketIpExt + DualStackIpExt<OtherVersion: SocketIpExt>, D> DualStackLocalIp<I, D>
impl<I: SocketIpExt + DualStackIpExt<OtherVersion: SocketIpExt>, D> DualStackLocalIp<I, D>
Sourcepub fn new(local_ip: ZonedAddr<SpecifiedAddr<I::Addr>, D>) -> Self
pub fn new(local_ip: ZonedAddr<SpecifiedAddr<I::Addr>, D>) -> Self
Returns the DualStackLocalIp
for the given `local_ip``.
If local_ip
is the unspecified address for the other stack, returns
Self::OtherStack(None)
.
Auto Trait Implementations§
impl<I, D> Freeze for DualStackLocalIp<I, D>where
D: Freeze,
<I as Ip>::Addr: Freeze,
<<I as DualStackIpExt>::OtherVersion as Ip>::Addr: Freeze,
impl<I, D> RefUnwindSafe for DualStackLocalIp<I, D>where
D: RefUnwindSafe,
<I as Ip>::Addr: RefUnwindSafe,
<<I as DualStackIpExt>::OtherVersion as Ip>::Addr: RefUnwindSafe,
impl<I, D> Send for DualStackLocalIp<I, D>where
D: Send,
impl<I, D> Sync for DualStackLocalIp<I, D>where
D: Sync,
impl<I, D> Unpin for DualStackLocalIp<I, D>
impl<I, D> UnwindSafe for DualStackLocalIp<I, D>where
D: UnwindSafe,
<I as Ip>::Addr: UnwindSafe,
<<I as DualStackIpExt>::OtherVersion as Ip>::Addr: UnwindSafe,
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<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