pub enum MessagePayload {
Json(JsonPayload),
Binary(BinaryPayload),
Text(String),
Empty,
}
Expand description
Zero-copy message payload
Variants§
Json(JsonPayload)
JSON payload with potential zero-copy
Binary(BinaryPayload)
Binary payload (MessagePack
, Protocol Buffers, etc.)
Text(String)
Text payload
Empty
Empty payload
Implementations§
Trait Implementations§
Source§impl Clone for MessagePayload
impl Clone for MessagePayload
Source§fn clone(&self) -> MessagePayload
fn clone(&self) -> MessagePayload
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 moreAuto Trait Implementations§
impl !Freeze for MessagePayload
impl RefUnwindSafe for MessagePayload
impl Send for MessagePayload
impl Sync for MessagePayload
impl Unpin for MessagePayload
impl UnwindSafe for MessagePayload
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