Enum homestar_invocation::task::instruction::input::Input
source · pub enum Input<T> {
Ipld(Ipld),
Deferred(Await),
Arg(Result<T>),
}Expand description
Variants§
Ipld(Ipld)
[Ipld] Literals.
Deferred(Await)
Promise-links awaiting the output of another Instruction’s invocation, directly.
Arg(Result<T>)
General argument, wrapping an task::Result over a task-specific implementation’s own input type(s).
Implementations§
source§impl<T> Input<T>
impl<T> Input<T>
sourcepub async fn resolve<'a, F>(self, lookup_fn: F) -> Input<T>
pub async fn resolve<'a, F>(self, lookup_fn: F) -> Input<T>
Resolve [awaited promise] of an Input into a task-specific Input::Arg, given a successful lookup function; otherwise, return Input::Deferred for an unresolved promise, or just return Input::Ipld, resolving Ipld links if the lookup function expected [Ipld] input data.
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Input<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Input<T>where
T: Deserialize<'de>,
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<T: PartialEq> PartialEq for Input<T>
impl<T: PartialEq> PartialEq for Input<T>
impl<T> StructuralPartialEq for Input<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Input<T>where
T: RefUnwindSafe,
impl<T> Send for Input<T>where
T: Send,
impl<T> Sync for Input<T>where
T: Sync,
impl<T> Unpin for Input<T>where
T: Unpin,
impl<T> UnwindSafe for Input<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> Base64Encode for Twhere
T: DagJson,
impl<T> Base64Encode for Twhere
T: DagJson,
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> DagJson for Twhere
T: Serialize + DeserializeOwned,
impl<T> DagJson for Twhere
T: Serialize + DeserializeOwned,
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read more