pub struct Message<'a> {
pub created_at: Datetime,
pub facets: Option<Vec<Facet<'a>>>,
pub reply: Option<ReplyRef<'a>>,
pub streamer: Did<'a>,
pub text: CowStr<'a>,
pub extra_data: BTreeMap<SmolStr, Data<'a>>,
}Expand description
Record containing a Streamplace chat message.
Fields§
§created_at: DatetimeClient-declared timestamp when this message was originally created.
facets: Option<Vec<Facet<'a>>>Annotations of text (mentions, URLs, etc)
reply: Option<ReplyRef<'a>>§streamer: Did<'a>The DID of the streamer whose chat this is.
text: CowStr<'a>The primary message content. May be an empty string, if there are embeds.
extra_data: BTreeMap<SmolStr, Data<'a>>Trait Implementations§
Source§impl Collection for Message<'_>
impl Collection for Message<'_>
Source§const NSID: &'static str = "place.stream.chat.message"
const NSID: &'static str = "place.stream.chat.message"
The NSID for the Lexicon that defines the schema of records in this collection.
Source§type Record = MessageRecord
type Record = MessageRecord
A marker type implementing
XrpcResp that allows typed deserialization of records
from this collection. Used by [Agent::get_record] to return properly typed responses.Source§impl<'de: 'a, 'a> Deserialize<'de> for Message<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Message<'a>
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
Source§impl From<MessageGetRecordOutput<'_>> for Message<'_>
impl From<MessageGetRecordOutput<'_>> for Message<'_>
Source§fn from(output: MessageGetRecordOutput<'_>) -> Self
fn from(output: MessageGetRecordOutput<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> IntoStatic for Message<'a>
impl<'a> IntoStatic for Message<'a>
impl<'a> Eq for Message<'a>
impl<'a> StructuralPartialEq for Message<'a>
Auto Trait Implementations§
impl<'a> Freeze for Message<'a>
impl<'a> RefUnwindSafe for Message<'a>
impl<'a> Send for Message<'a>
impl<'a> Sync for Message<'a>
impl<'a> Unpin for Message<'a>
impl<'a> UnwindSafe for Message<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.