pub struct MessageWrapper {
pub o: MessageType,
pub d: String,
}Expand description
Struct to serialize/deserialize messages sent over Cwtch between profiles / conversation Overlay => data 1 TextMessage: d = plain text message 10 QuotedMessage: d = json of QuotedMessageStructure, body = plain text of message
Fields§
§o: MessageTypeoverlay id that the message is targeting as defined in cwtch/model/overlay.go [ OverlayChat = 1, OverlayInviteContact = 100, OverlayInviteGroup = 101, OverlayFileSharing = 200 ]
d: Stringdata of the message, for OverlayChat, a
Implementations§
Trait Implementations§
Source§impl Clone for MessageWrapper
impl Clone for MessageWrapper
Source§fn clone(&self) -> MessageWrapper
fn clone(&self) -> MessageWrapper
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 MessageWrapper
impl Debug for MessageWrapper
Source§impl<'de> Deserialize<'de> for MessageWrapper
impl<'de> Deserialize<'de> for MessageWrapper
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 MessageWrapper
impl RefUnwindSafe for MessageWrapper
impl Send for MessageWrapper
impl Sync for MessageWrapper
impl Unpin for MessageWrapper
impl UnwindSafe for MessageWrapper
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