pub trait Context {
type Ctx: RawContext;
// Required methods
fn ctx(&self) -> Self::Ctx;
fn ctx_mut(&mut self) -> &mut Self::Ctx;
fn replace_ctx(&mut self, ctx: Self::Ctx) -> Self::Ctx;
fn set_ctx(&mut self, ctx: Self::Ctx) -> &mut Self;
}
Required Associated Types§
type Ctx: RawContext
Required Methods§
Sourcefn replace_ctx(&mut self, ctx: Self::Ctx) -> Self::Ctx
fn replace_ctx(&mut self, ctx: Self::Ctx) -> Self::Ctx
replace the current context with the given before returning the previous entry.
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.