Enum netstack3_base::socket::EitherStack
source · pub enum EitherStack<T, O> {
ThisStack(T),
OtherStack(O),
}
Expand description
State belonging to either IP stack.
Like [either::Either]
, but with more helpful variant names.
Note that this type is not optimally type-safe, because T
and O
are not
bound by IP
and IP::OtherVersion
, respectively. In many cases it may be
more appropriate to define a one-off enum parameterized over I: Ip
.
Variants§
Trait Implementations§
source§impl<TA, OA, D> AsRef<Option<D>> for EitherStack<ListenerAddr<TA, D>, ListenerAddr<OA, D>>
impl<TA, OA, D> AsRef<Option<D>> for EitherStack<ListenerAddr<TA, D>, ListenerAddr<OA, D>>
source§impl<T, O> Clone for EitherStack<T, O>
impl<T, O> Clone for EitherStack<T, O>
source§impl<T: PartialEq, O: PartialEq> PartialEq for EitherStack<T, O>
impl<T: PartialEq, O: PartialEq> PartialEq for EitherStack<T, O>
source§fn eq(&self, other: &EitherStack<T, O>) -> bool
fn eq(&self, other: &EitherStack<T, O>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T: Eq, O: Eq> Eq for EitherStack<T, O>
impl<T, O> StructuralPartialEq for EitherStack<T, O>
Auto Trait Implementations§
impl<T, O> Freeze for EitherStack<T, O>
impl<T, O> RefUnwindSafe for EitherStack<T, O>where
T: RefUnwindSafe,
O: RefUnwindSafe,
impl<T, O> Send for EitherStack<T, O>
impl<T, O> Sync for EitherStack<T, O>
impl<T, O> Unpin for EitherStack<T, O>
impl<T, O> UnwindSafe for EitherStack<T, O>where
T: UnwindSafe,
O: 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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