pub struct ExecutionContext { /* private fields */ }
Expand description
Plan execution context containing runtime state
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn new(parameters: Value, captures: Vec<Arc<dyn RpcTarget>>) -> Self
pub fn new(parameters: Value, captures: Vec<Arc<dyn RpcTarget>>) -> Self
Create a new execution context
Sourcepub async fn get_source_value(
&self,
source: &Source,
) -> Result<Value, PlanExecutionError>
pub async fn get_source_value( &self, source: &Source, ) -> Result<Value, PlanExecutionError>
Get a source value from the context
Sourcepub fn set_result(&mut self, index: u32, value: Value)
pub fn set_result(&mut self, index: u32, value: Value)
Set a result value
Sourcepub fn get_capability(
&self,
index: u32,
) -> Result<Arc<dyn RpcTarget>, PlanExecutionError>
pub fn get_capability( &self, index: u32, ) -> Result<Arc<dyn RpcTarget>, PlanExecutionError>
Get a capability by index
Trait Implementations§
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