Trait ModelContext

Source
pub trait ModelContext {
    type Context;

    // Required method
    fn context() -> Self::Context;
}
Expand description

Represents a source of context for models.

Models can retrieve context from an implementor of this trait.

Required Associated Types§

Source

type Context

Associated type representing the actual context.

Required Methods§

Source

fn context() -> Self::Context

Returns the context for a model.

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.

Implementations on Foreign Types§

Source§

impl ModelContext for ()

Placeholder type for models that do not require any external context.

Implementors§