pub struct Message {
pub serial: String,
pub version: Box<MessageVersion>,
pub text: String,
pub client_id: String,
pub action: MessageAction,
pub metadata: HashMap<String, Value>,
pub headers: HashMap<String, String>,
pub timestamp: i64,
pub user_claim: Option<String>,
pub reactions: Option<Box<MessageReactions>>,
}Expand description
Message : A chat message in the V4 REST representation.
Fields§
§serial: StringThe unique identifier of the message.
version: Box<MessageVersion>§text: StringThe text content of the message.
client_id: StringThe client ID of the user who created the message.
action: MessageAction§metadata: HashMap<String, Value>Arbitrary user-defined metadata. Not interpreted or validated by Ably; treat as untrusted input when reading.
headers: HashMap<String, String>Arbitrary user-defined string headers, carried as Ably message extras.headers. Not interpreted or validated by Ably.
timestamp: i64Milliseconds since the Unix epoch at which the message was created.
user_claim: Option<String>User claim attached by the server when the publishing token contained a matching ably.room.<roomName> claim. Present only in that case.
reactions: Option<Box<MessageReactions>>Implementations§
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 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 UnsafeUnpin 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