pub struct MessagePacket {
pub message_type: String,
pub server_message_id: Option<u64>,
pub timestamp: u64,
pub payload: Value,
pub headers: HashMap<String, String>,
}Expand description
通用消息包装器
Fields§
§message_type: String§server_message_id: Option<u64>§timestamp: u64§payload: Value§headers: HashMap<String, String>Trait Implementations§
Source§impl Clone for MessagePacket
impl Clone for MessagePacket
Source§fn clone(&self) -> MessagePacket
fn clone(&self) -> MessagePacket
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 MessagePacket
impl Debug for MessagePacket
Source§impl<'de> Deserialize<'de> for MessagePacket
impl<'de> Deserialize<'de> for MessagePacket
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 MessagePacket
impl RefUnwindSafe for MessagePacket
impl Send for MessagePacket
impl Sync for MessagePacket
impl Unpin for MessagePacket
impl UnsafeUnpin for MessagePacket
impl UnwindSafe for MessagePacket
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