netstack3_base

Trait BuildableCoreContext

Source
pub trait BuildableCoreContext<BC> {
    type Builder;

    // Required method
    fn build(bindings_ctx: &mut BC, builder: Self::Builder) -> Self;
}
Expand description

A core context that can be created from some builder type.

This allows CtxPair to define its construction methods away from where core contexts are actually defined.

Required Associated Types§

Source

type Builder

The builder type that can build this core context.

Required Methods§

Source

fn build(bindings_ctx: &mut BC, builder: Self::Builder) -> Self

Consumes this builder and returns the context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<O, BC> BuildableCoreContext<BC> for O
where O: Default,