pub struct SimpleContext {
pub value: Value,
}Expand description
Simple context implementation that holds a single value
Fields§
§value: ValueThe current value being processed
Trait Implementations§
Source§impl Context for SimpleContext
impl Context for SimpleContext
Source§fn get_variable(&self, _name: &str) -> Option<&Value>
fn get_variable(&self, _name: &str) -> Option<&Value>
Returns the current value for any variable name (since SimpleContext has no named variables)
Source§fn set_variable(&mut self, _name: &str, _value: Value)
fn set_variable(&mut self, _name: &str, _value: Value)
Does nothing since SimpleContext doesn’t support setting variables
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast mutably
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more