pub struct Message {
pub serial: Serial,
pub version: MessageVersion,
pub text: String,
pub client_id: String,
pub action: MessageAction,
pub metadata: Metadata,
pub headers: BTreeMap<String, String>,
pub user_claim: Option<String>,
pub timestamp: Timestamp,
pub reactions: ReactionSummary,
}Expand description
A chat message in the V4 REST representation.
Fields§
§serial: SerialThe message’s unique, region-scoped identifier.
version: MessageVersionDetails of the latest create/update/delete version of this message.
text: StringThe text content of the message.
client_id: StringThe client ID of the user who created the message.
action: MessageActionThe action that produced this message version.
metadata: MetadataArbitrary user-defined metadata.
headers: BTreeMap<String, String>Arbitrary user-defined string headers.
user_claim: Option<String>User claim attached by the server, present only when the publishing
token carried a matching ably.room.<roomName> claim.
timestamp: TimestampMilliseconds since the Unix epoch at which the message was created.
reactions: ReactionSummarySummary of reactions on this message. Absent groups default to empty.
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
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