pub struct DynContext { /* private fields */ }Expand description
Dynamic context object.
Provides every type that is 'static via ContextProvides, but will panic at runtime if used
with an unavailable type.
Implementations§
Source§impl DynContext
impl DynContext
Sourcepub fn provide_if_set<T: 'static>(&self) -> Option<&T>
pub fn provide_if_set<T: 'static>(&self) -> Option<&T>
Gets a single value if the type exists in the map
Trait Implementations§
Source§impl<V> ContextProvides<V> for DynContextwhere
V: 'static,
impl<V> ContextProvides<V> for DynContextwhere
V: 'static,
Source§impl Debug for DynContext
impl Debug for DynContext
Source§impl Default for DynContext
impl Default for DynContext
Source§fn default() -> DynContext
fn default() -> DynContext
Returns the “default value” for a type. Read more
impl Context for DynContext
Auto Trait Implementations§
impl Freeze for DynContext
impl !RefUnwindSafe for DynContext
impl !Send for DynContext
impl !Sync for DynContext
impl Unpin for DynContext
impl !UnwindSafe for DynContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more