pub struct Message {
pub id: MsgId,
pub sender: Identity,
pub associator: String,
pub tags: TagSet,
pub payload: Vec<u8>,
}
Expand description
A multi-purpose service Message
While this representation is quite “low level”, i.e. forces a user to deal with payload encoding themselves and provides no functionality for async payloads (via filesharing, or similar), it is quite a high level abstraction considering the data that needs to be sent over the network in order for it to reach it’s recipient.
This type is both returned by listen
, poll
, as well as
specific message queries
Fields§
§id: MsgId
A unique message ID
sender: Identity
The sender identity
associator: String
The embedded service associator
A tag store for persistent message metadata
payload: Vec<u8>
A raw byte Message
payload
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 Eq for Message
impl StructuralPartialEq for Message
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