pub struct Message {Show 17 fields
pub id: String,
pub tid: String,
pub name: String,
pub state: MessageState,
pub type: String,
pub source: String,
pub model: Model,
pub pid: String,
pub nid: String,
pub mid: String,
pub key: String,
pub inputs: Vars,
pub outputs: Vars,
pub tag: String,
pub start_time: i64,
pub end_time: i64,
pub retry_times: i32,
}Fields§
§id: Stringmessage id
tid: Stringtask id
name: Stringnode name or action name
state: MessageStatetask action state
type: Stringmessage type workflow | step | branch | msg | irq
source: String§model: Model§pid: Stringprocess id
nid: Stringnode id
mid: Stringmodel id
key: Stringnode id or act key if the key is empty, just using nid as the key
inputs: Varsfrom the task inputs
outputs: Varsset the outputs vars when complete the action
tag: Stringtag to distinguish different message it is from node tag or group tag
start_time: i64task start time in million second
end_time: i64task end time in million second
retry_times: i32record the message retry times
Implementations§
Source§impl Message
impl Message
pub fn state(&self) -> MessageState
pub fn is_key(&self, key: &str) -> bool
pub fn is_state(&self, state: MessageState) -> bool
pub fn is_type(&self, t: &str) -> bool
pub fn is_source(&self, t: &str) -> bool
pub fn is_tag(&self, tag: &str) -> bool
pub fn type_of(&self, mtype: &str) -> Option<&Self>
pub fn tag_of(&self, tag: &str) -> Option<&Self>
pub fn key_of(&self, key: &str) -> Option<&Self>
pub fn into(&self, emit_id: &str, pat: &str) -> Message
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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 Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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