Struct netstack3_base::CtxPair
source · pub struct CtxPair<CC, BC> {
pub core_ctx: CC,
pub bindings_ctx: BC,
}
Expand description
A concrete implementation of ContextPair
.
CtxPair
provides a ContextPair
implementation when CC
and BC
are
ContextProvider
and using their respective targets as the CoreContext
and BindingsContext
associated types.
Fields§
§core_ctx: CC
The core context.
bindings_ctx: BC
The bindings context.
Trait Implementations§
source§impl<CC, BC> ContextPair for CtxPair<CC, BC>where
CC: ContextProvider,
BC: ContextProvider,
impl<CC, BC> ContextPair for CtxPair<CC, BC>where
CC: ContextProvider,
BC: ContextProvider,
§type CoreContext = <CC as ContextProvider>::Context
type CoreContext = <CC as ContextProvider>::Context
The core context type held by this pair.
§type BindingsContext = <BC as ContextProvider>::Context
type BindingsContext = <BC as ContextProvider>::Context
The bindings context type held by this pair.
source§fn contexts(&mut self) -> (&mut Self::CoreContext, &mut Self::BindingsContext)
fn contexts(&mut self) -> (&mut Self::CoreContext, &mut Self::BindingsContext)
Gets a mutable reference to both contexts.
source§fn core_ctx(&mut self) -> &mut Self::CoreContext
fn core_ctx(&mut self) -> &mut Self::CoreContext
Gets a mutable reference to the core context.
source§fn bindings_ctx(&mut self) -> &mut Self::BindingsContext
fn bindings_ctx(&mut self) -> &mut Self::BindingsContext
Gets a mutable reference to the bindings context.
Auto Trait Implementations§
impl<CC, BC> Freeze for CtxPair<CC, BC>
impl<CC, BC> RefUnwindSafe for CtxPair<CC, BC>where
CC: RefUnwindSafe,
BC: RefUnwindSafe,
impl<CC, BC> Send for CtxPair<CC, BC>
impl<CC, BC> Sync for CtxPair<CC, BC>
impl<CC, BC> Unpin for CtxPair<CC, BC>
impl<CC, BC> UnwindSafe for CtxPair<CC, BC>where
CC: UnwindSafe,
BC: 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<BC, Meta> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<BC, Meta> 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§impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
source§fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
Handle a timer firing.