pub struct SimpleContext { /* private fields */ }Expand description
A simple context that stores the variables in a hash map.
For those who don’t want to implement the Context trait, this is a simple
implementation that can be used.
Implementations§
Trait Implementations§
Source§impl Context for SimpleContext
impl Context for SimpleContext
fn get_var<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExprValue, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_fn<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<&Box<dyn ExprFn>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for SimpleContext
impl !RefUnwindSafe for SimpleContext
impl Send for SimpleContext
impl Sync for SimpleContext
impl Unpin for SimpleContext
impl !UnwindSafe for SimpleContext
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