pub struct Act {Show 16 fields
pub id: String,
pub name: String,
pub act: String,
pub key: String,
pub tag: String,
pub in: String,
pub on: String,
pub inputs: Vars,
pub rets: Vars,
pub outputs: Vars,
pub setup: Vec<Act>,
pub then: Vec<Act>,
pub else: Vec<Act>,
pub next: Option<Box<Act>>,
pub catches: Vec<Catch>,
pub timeout: Vec<Timeout>,
}Fields§
§id: String§name: String§act: String§key: Stringact key for req and msg
tag: String§in: Stringin expression for ‘each’ and ‘chain’
on: Stringon expression for ‘if’ and ‘on_timeout’
inputs: Varsact arguments for act function, such as ‘set’, ‘req’
rets: Vars§outputs: Vars§setup: Vec<Act>§then: Vec<Act>act list for act event, such as on_completed, on_catch, on_timeout
else: Vec<Act>§next: Option<Box<Act>>next act for ‘block’
catches: Vec<Catch>§timeout: Vec<Timeout>Implementations§
Source§impl Act
impl Act
pub fn is_taskable(&self) -> bool
pub fn new() -> Self
pub fn with_act(self, act: &str) -> Self
pub fn with_id(self, id: &str) -> Self
pub fn with_name(self, name: &str) -> Self
pub fn with_key(self, key: &str) -> Self
pub fn with_tag(self, tag: &str) -> Self
pub fn with_input<T>(self, name: &str, value: T) -> Self
pub fn with_ret<T>(self, name: &str, value: T) -> Self
pub fn with_then(self, build: fn(Vec<Act>) -> Vec<Act>) -> Self
pub fn with_next<F: Fn(Act) -> Act>(self, build: F) -> Self
pub fn with_setup(self, build: fn(Vec<Act>) -> Vec<Act>) -> Self
pub fn with_in(self, expr: &str) -> Self
pub fn with_on(self, expr: &str) -> Self
pub fn with_catch(self, build: fn(Catch) -> Catch) -> Self
pub fn with_timeout(self, build: fn(Timeout) -> Timeout) -> Self
pub fn set(var: Vars) -> Self
pub fn expose(var: Vars) -> Self
pub fn irq<F: Fn(Irq) -> Irq>(build: F) -> Self
pub fn msg<F: Fn(Msg) -> Msg>(build: F) -> Self
pub fn if<F: Fn(If) -> If>(build: F) -> Self
pub fn each<F: Fn(Each) -> Each>(build: F) -> Self
pub fn call<F: Fn(Call) -> Call>(build: F) -> Self
pub fn chain<F: Fn(Chain) -> Chain>(build: F) -> Self
pub fn cmd<F: Fn(Do) -> Do>(build: F) -> Self
pub fn block<F: Fn(Block) -> Block>(build: F) -> Self
pub fn pack<F: Fn(Pack) -> Pack>(build: F) -> Self
pub fn catch<F: Fn(Catch) -> Catch>(build: F) -> Self
pub fn timeout<F: Fn(Timeout) -> Timeout>(build: F) -> Self
pub fn on_created(build: fn(Vec<Act>) -> Vec<Act>) -> Self
pub fn on_completed(build: fn(Vec<Act>) -> Vec<Act>) -> Self
pub fn on_before_update(build: fn(Vec<Act>) -> Vec<Act>) -> Self
pub fn on_updated(build: fn(Vec<Act>) -> Vec<Act>) -> Self
pub fn on_step(build: fn(Vec<Act>) -> Vec<Act>) -> Self
pub fn on_catch(build: fn(Vec<Catch>) -> Vec<Catch>) -> Self
pub fn on_timeout(build: fn(Vec<Timeout>) -> Vec<Timeout>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Act
impl<'de> Deserialize<'de> for Act
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
Auto Trait Implementations§
impl Freeze for Act
impl RefUnwindSafe for Act
impl Send for Act
impl Sync for Act
impl Unpin for Act
impl UnwindSafe for Act
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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