ContextProvides

Trait ContextProvides 

Source
pub trait ContextProvides<V> {
    // Required method
    fn provide(&self) -> &V;
}
Expand description

Signals that the context statically provides a certain type.

Writables may require this bound upon the output’s context in order to implement themselves. A context that is calculated at runtime should implement ContextProvides<T> for all T, and panic at runtime if a value is called that is not present. A context that is calculated statically should implement this trait only for the types it is statically known to provide.

Required Methods§

Source

fn provide(&self) -> &V

Implementations on Foreign Types§

Source§

impl<'c, C, V> ContextProvides<V> for &'c C
where C: ContextProvides<V>,

Source§

fn provide(&self) -> &V

Implementors§

Source§

impl<V> ContextProvides<V> for DynContext
where V: 'static,

Source§

impl<V> ContextProvides<V> for SingularContext<V>