pub struct Message {Show 17 fields
pub id: String,
pub tid: String,
pub nid: String,
pub mid: String,
pub name: String,
pub state: String,
pub type: String,
pub source: String,
pub model: Model,
pub pid: 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
nid: Stringnode id
mid: Stringmodel id
name: Stringnode name or action name
state: Stringtask action state
type: Stringmessage type msg | req
source: String§model: Model§pid: Stringproc id
key: StringnodeId or specific message 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: &str) -> 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>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request