pub struct ContextView<'v> { /* private fields */ }Expand description
The message context converted into the arena once, for evaluating several
expressions against it. Built by TaskContext::with_view.
Each method evaluates exactly as its TaskContext namesake does, with
the same errors, but against this one conversion instead of a fresh one.
Implementations§
Source§impl ContextView<'_>
impl ContextView<'_>
Sourcepub fn eval(&self, logic: &Logic) -> Result<OwnedDataValue>
pub fn eval(&self, logic: &Logic) -> Result<OwnedDataValue>
Sourcepub fn eval_to_plain_string(&self, logic: &Logic) -> Result<String>
pub fn eval_to_plain_string(&self, logic: &Logic) -> Result<String>
As TaskContext::eval_to_plain_string, against this view: a string
result yields its contents, anything else its compact JSON form.
§Errors
Auto Trait Implementations§
impl<'v> !RefUnwindSafe for ContextView<'v>
impl<'v> !Send for ContextView<'v>
impl<'v> !Sync for ContextView<'v>
impl<'v> !UnwindSafe for ContextView<'v>
impl<'v> Freeze for ContextView<'v>
impl<'v> Unpin for ContextView<'v>
impl<'v> UnsafeUnpin for ContextView<'v>
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