[][src]Trait dyn_context::ContextExt

pub trait ContextExt: Context {
    fn get<T: 'static>(&self) -> &T { ... }
fn get_mut<T: 'static>(&mut self) -> &mut T { ... } }

Extends Context with methods that make it easier to access the content of the context.

Provided methods

fn get<T: 'static>(&self) -> &T

Borrows shareable data reference.

Panics if the context does not provide requested type.

fn get_mut<T: 'static>(&mut self) -> &mut T

Borrows mutable data reference.

Panics if the context does not provide requested type.

Loading content...

Implementors

impl<T: Context + ?Sized> ContextExt for T[src]

Loading content...