#[non_exhaustive]pub struct PresenceStatus {
pub msg: Option<String>,
/* private fields */
}Available on crate feature
unstable-msc4532 only.Expand description
A user’s extensible status.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.msg: Option<String>An optional description to accompany the presence.
Implementations§
Source§impl PresenceStatus
impl PresenceStatus
Sourcepub fn with_data(msg: Option<String>, data: JsonObject) -> Self
pub fn with_data(msg: Option<String>, data: JsonObject) -> Self
Creates a new PresenceStatus with the given message and additional data.
Sourcepub fn data(&self) -> Cow<'_, JsonObject>
pub fn data(&self) -> Cow<'_, JsonObject>
The data of this PresenceStatus.
The returned JSON object won’t contain the msg field; use Self::msg to access it.
Prefer to use the public fields when possible; this method is meant to be used to access unsupported fields only.
Trait Implementations§
Source§impl Clone for PresenceStatus
impl Clone for PresenceStatus
Source§impl Debug for PresenceStatus
impl Debug for PresenceStatus
Source§impl Default for PresenceStatus
impl Default for PresenceStatus
Source§impl<'de> Deserialize<'de> for PresenceStatus
impl<'de> Deserialize<'de> for PresenceStatus
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 PartialEq for PresenceStatus
impl PartialEq for PresenceStatus
Source§impl Serialize for PresenceStatus
impl Serialize for PresenceStatus
impl StructuralPartialEq for PresenceStatus
Auto Trait Implementations§
impl Freeze for PresenceStatus
impl RefUnwindSafe for PresenceStatus
impl Send for PresenceStatus
impl Sync for PresenceStatus
impl Unpin for PresenceStatus
impl UnsafeUnpin for PresenceStatus
impl UnwindSafe for PresenceStatus
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