Trait netstack3_base::CoreEventContext
source · pub trait CoreEventContext<T> {
type OuterEvent;
// Required method
fn convert_event(event: T) -> Self::OuterEvent;
// Provided method
fn on_event<BC: EventContext<Self::OuterEvent>>(
bindings_ctx: &mut BC,
event: T,
) { ... }
}
Expand description
An event context implemented by core contexts to wrap event types that are not exposed to bindings.
Required Associated Types§
sourcetype OuterEvent
type OuterEvent
The outer event type.
Required Methods§
sourcefn convert_event(event: T) -> Self::OuterEvent
fn convert_event(event: T) -> Self::OuterEvent
Converts the event to the outer event type.
Provided Methods§
sourcefn on_event<BC: EventContext<Self::OuterEvent>>(bindings_ctx: &mut BC, event: T)
fn on_event<BC: EventContext<Self::OuterEvent>>(bindings_ctx: &mut BC, event: T)
A helper to emit an event
through a bindings context that implements
EventContext
on the [OuterEvent
].
Object Safety§
This trait is not object safe.