pub struct Message {
pub id: String,
pub target: String,
pub origin: Option<String>,
pub event: String,
pub data: Option<JsonValue>,
pub sendid: Option<String>,
pub correlation: Option<String>,
}Expand description
A Vertep envelope on the wire.
Fields§
§id: StringThe message id, the receiver’s deduplication key.
target: StringThe receiver’s IRI.
origin: Option<String>The sender’s IRI.
event: StringThe event name.
data: Option<JsonValue>The payload, in the runtime’s lossless JSON encoding.
sendid: Option<String>The send id (_event.sendid).
correlation: Option<String>A request’s correlation id, or the one a reply answers.
Implementations§
Source§impl Message
impl Message
Sourcepub fn from_envelope(env: &Envelope) -> Self
pub fn from_envelope(env: &Envelope) -> Self
The wire form of env.
Sourcepub fn into_envelope(self) -> Envelope
pub fn into_envelope(self) -> Envelope
The envelope a receiver delivers: an external event whose origin type names this processor and whose origin is the sender’s IRI.
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
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Forget for Message
impl Freeze for Message
impl Move for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin 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