pub struct MessageContext {
pub message_id: u128,
pub metadata: HashMap<String, String>,
}Expand description
A context object that holds metadata and identification for a message, separated from the payload. Useful for typed handlers.
Fields§
§message_id: u128§metadata: HashMap<String, String>Trait Implementations§
Source§impl Clone for MessageContext
impl Clone for MessageContext
Source§fn clone(&self) -> MessageContext
fn clone(&self) -> MessageContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageContext
impl Debug for MessageContext
Source§impl From<CanonicalMessage> for MessageContext
impl From<CanonicalMessage> for MessageContext
Source§fn from(msg: CanonicalMessage) -> Self
fn from(msg: CanonicalMessage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MessageContext
impl RefUnwindSafe for MessageContext
impl Send for MessageContext
impl Sync for MessageContext
impl Unpin for MessageContext
impl UnsafeUnpin for MessageContext
impl UnwindSafe for MessageContext
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