pub struct ExecutionContext { /* private fields */ }Expand description
Execution context containing variables and state for rule evaluation
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn set_variable(&mut self, key: String, value: String)
pub fn set_variable(&mut self, key: String, value: String)
Set a variable value
Sourcepub fn get_variable(&self, key: &str) -> Option<&String>
pub fn get_variable(&self, key: &str) -> Option<&String>
Get a variable value
Sourcepub fn get_variables(&self) -> &HashMap<String, String>
pub fn get_variables(&self) -> &HashMap<String, String>
Get all variables
Sourcepub fn set_metadata(&mut self, key: String, value: String)
pub fn set_metadata(&mut self, key: String, value: String)
Set metadata
Sourcepub fn get_metadata(&self, key: &str) -> Option<&String>
pub fn get_metadata(&self, key: &str) -> Option<&String>
Get metadata
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
Returns a duplicate of the value. Read more
1.0.0 · 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 ExecutionContext
impl Debug for ExecutionContext
Source§impl Default for ExecutionContext
impl Default for ExecutionContext
Source§impl<'de> Deserialize<'de> for ExecutionContext
impl<'de> Deserialize<'de> for ExecutionContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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