pub struct EvaluationContext { /* private fields */ }Expand description
Evaluation context - provides field values for rule evaluation
Implementations§
Source§impl EvaluationContext
impl EvaluationContext
Sourcepub fn from_request(request: &EvaluationRequest) -> Self
pub fn from_request(request: &EvaluationRequest) -> Self
Create context from evaluation request
Sourcepub fn get_field(&self, path: &str) -> Option<&FieldValue>
pub fn get_field(&self, path: &str) -> Option<&FieldValue>
Get field value
Sourcepub fn set_field(&mut self, path: &str, value: FieldValue)
pub fn set_field(&mut self, path: &str, value: FieldValue)
Set field value
Sourcepub fn fields(&self) -> &HashMap<String, FieldValue>
pub fn fields(&self) -> &HashMap<String, FieldValue>
Get all fields
Auto Trait Implementations§
impl Freeze for EvaluationContext
impl RefUnwindSafe for EvaluationContext
impl Send for EvaluationContext
impl Sync for EvaluationContext
impl Unpin for EvaluationContext
impl UnsafeUnpin for EvaluationContext
impl UnwindSafe for EvaluationContext
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