pub struct TaskContext {
pub previous_task_id: Option<String>,
pub current_task_id: Option<String>,
pub next_task_id: Option<String>,
pub steps: HashMap<String, ConnectorStepState>,
pub env: HashMap<String, String>,
pub input: HashMap<String, Value>,
pub job: WorkflowInstance,
pub step: ConnectorStep,
pub workflow: Workflow,
pub connector: Connector,
pub version: ConnectorVersion,
}Fields§
§previous_task_id: Option<String>Connector that owns this schema instance
current_task_id: Option<String>Connector that owns this schema instance
next_task_id: Option<String>Connector that owns this schema instance
steps: HashMap<String, ConnectorStepState>§env: HashMap<String, String>§input: HashMap<String, Value>§job: WorkflowInstance§step: ConnectorStep§workflow: Workflow§connector: Connector§version: ConnectorVersionImplementations§
Source§impl TaskContext
impl TaskContext
Sourcepub fn resolve_variables(&self, template: String) -> Result<String>
pub fn resolve_variables(&self, template: String) -> Result<String>
gets rion with context applied
Sourcepub fn resolve_input_variables<T>(
&self,
template: HashMap<String, Value>,
) -> Result<T>where
T: Serialize + DeserializeOwned,
pub fn resolve_input_variables<T>(
&self,
template: HashMap<String, Value>,
) -> Result<T>where
T: Serialize + DeserializeOwned,
gets rion with context applied
Sourcepub fn value_to_output<T>(value: T) -> Result<HashMap<String, Value>>where
T: Serialize + DeserializeOwned,
pub fn value_to_output<T>(value: T) -> Result<HashMap<String, Value>>where
T: Serialize + DeserializeOwned,
gets rion with context applied
Trait Implementations§
Source§impl Clone for TaskContext
impl Clone for TaskContext
Source§fn clone(&self) -> TaskContext
fn clone(&self) -> TaskContext
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 TaskContext
impl Debug for TaskContext
Source§impl<'de> Deserialize<'de> for TaskContext
impl<'de> Deserialize<'de> for TaskContext
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
Source§impl PartialEq for TaskContext
impl PartialEq for TaskContext
Source§impl Serialize for TaskContext
impl Serialize for TaskContext
impl Eq for TaskContext
impl StructuralPartialEq for TaskContext
Auto Trait Implementations§
impl Freeze for TaskContext
impl RefUnwindSafe for TaskContext
impl Send for TaskContext
impl Sync for TaskContext
impl Unpin for TaskContext
impl UnwindSafe for TaskContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more