Skip to main content

RequiresState

Trait RequiresState 

Source
pub trait RequiresState<S: StateRegistry> { }
Expand description

Trait for types that require specific state to be registered.

This is implemented by extractors like State<T> to declare their state dependencies at the type level.

§Example

// State<DbPool> requires DbPool to be in the registry
impl<S: HasState<DbPool>> RequiresState<S> for State<DbPool> {}

Implementations on Foreign Types§

Source§

impl<S: StateRegistry> RequiresState<S> for ()

Implementors§