pub struct NodeContext {
pub input_data: Value,
pub variables: HashMap<String, Value>,
pub previous_results: HashMap<String, Value>,
pub metadata: HashMap<String, Value>,
}Expand description
Node execution context
Fields§
§input_data: ValueInput data for the node
variables: HashMap<String, Value>Workflow variables
previous_results: HashMap<String, Value>Previous node results
metadata: HashMap<String, Value>Custom metadata
Implementations§
Source§impl NodeContext
impl NodeContext
Sourcepub fn with_input(data: JsonValue) -> Self
pub fn with_input(data: JsonValue) -> Self
Create a context with input data
Sourcepub fn variable(self, key: impl Into<String>, value: JsonValue) -> Self
pub fn variable(self, key: impl Into<String>, value: JsonValue) -> Self
Add a variable to the context
Sourcepub fn previous_result(
self,
node_id: impl Into<String>,
result: JsonValue,
) -> Self
pub fn previous_result( self, node_id: impl Into<String>, result: JsonValue, ) -> Self
Add a previous result
Trait Implementations§
Source§impl Clone for NodeContext
impl Clone for NodeContext
Source§fn clone(&self) -> NodeContext
fn clone(&self) -> NodeContext
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 NodeContext
impl Debug for NodeContext
Source§impl Default for NodeContext
impl Default for NodeContext
Source§fn default() -> NodeContext
fn default() -> NodeContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NodeContext
impl RefUnwindSafe for NodeContext
impl Send for NodeContext
impl Sync for NodeContext
impl Unpin for NodeContext
impl UnsafeUnpin for NodeContext
impl UnwindSafe for NodeContext
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