pub struct RuleContext { /* private fields */ }Expand description
Context for rule evaluation
Implementations§
Source§impl RuleContext
impl RuleContext
Sourcepub fn from_value(value: Value) -> Self
pub fn from_value(value: Value) -> Self
Create from JSON value
Sourcepub fn get_metadata(&self, key: &str) -> Option<&str>
pub fn get_metadata(&self, key: &str) -> Option<&str>
Get metadata
Sourcepub fn merge(&mut self, other: RuleContext)
pub fn merge(&mut self, other: RuleContext)
Merge another context into this one
Trait Implementations§
Source§impl Clone for RuleContext
impl Clone for RuleContext
Source§fn clone(&self) -> RuleContext
fn clone(&self) -> RuleContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RuleContext
impl Debug for RuleContext
Source§impl Default for RuleContext
impl Default for RuleContext
Source§fn default() -> RuleContext
fn default() -> RuleContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuleContext
impl RefUnwindSafe for RuleContext
impl Send for RuleContext
impl Sync for RuleContext
impl Unpin for RuleContext
impl UnsafeUnpin for RuleContext
impl UnwindSafe for RuleContext
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