Skip to main content

HasComponent

Trait HasComponent 

Source
pub trait HasComponent<Name> {
    type Provider;
}
Expand description

Type-level lookup: maps a component Name to a concrete Provider type for a given implementor (the “context”).

This is the single foundational trait of the CGP substrate. All composition flows through it.

Required Associated Types§

Source

type Provider

The concrete provider type wired to Name for this context.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§