pub struct WorkPlan { /* private fields */ }Expand description
A canonical v1 plan backed by a Hara portable value.
Implementations§
Source§impl WorkPlan
impl WorkPlan
pub fn from_value(value: Value) -> Result<Self, String>
pub fn value(&self) -> Value
pub fn operation(&self) -> WorkOperation
pub fn encode_hta(&self) -> Result<Vec<u8>, String>
pub fn decode_hta(bytes: &[u8]) -> Result<Self, String>
pub fn pure(target: impl Into<String>) -> Result<Self, String>
pub fn step(target: impl Into<String>) -> Result<Self, String>
pub fn leaf( operation: WorkOperation, target: impl Into<String>, ) -> Result<Self, String>
pub fn chain(children: Vec<Self>) -> Result<Self, String>
pub fn all(children: Vec<Self>) -> Result<Self, String>
pub fn each(child: Self) -> Result<Self, String>
pub fn filter(child: Self) -> Result<Self, String>
pub fn children( operation: WorkOperation, children: Vec<Self>, ) -> Result<Self, String>
pub fn child(operation: WorkOperation, child: Self) -> Result<Self, String>
pub fn fold(initial: Value, reducer: Self) -> Result<Self, String>
pub fn choose(selector: Self, choices: Value) -> Result<Self, String>
pub fn graph(graph: Value) -> Result<Self, String>
pub fn batch(stages: Value) -> Result<Self, String>
pub fn bind( source: Self, continuation_target: impl Into<String>, ) -> Result<Self, String>
pub fn ensure(body: Self, cleanup: Self) -> Result<Self, String>
pub fn await_(wait: Value) -> Result<Self, String>
pub fn generic(operation: WorkOperation, fields: Value) -> Result<Self, String>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WorkPlan
impl !Send for WorkPlan
impl !Sync for WorkPlan
impl !UnwindSafe for WorkPlan
impl Freeze for WorkPlan
impl Unpin for WorkPlan
impl UnsafeUnpin for WorkPlan
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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