#[non_exhaustive]pub struct PresenceUpdate {
pub presence: PresenceState,
pub status: PresenceStatus,
}Available on crate feature
api and crate feature unstable-msc4186 and crate feature unstable-msc4559 and (crate features client-api-c or client-api-s) and (crate features client or server) only.Expand description
An update to a user’s presence.
According to MSC4559.
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.presence: PresenceStateThe user’s presence state.
Defaults to PresenceState::Offline.
status: PresenceStatusThe status information for this user’s presence, using the format from MSC4532.
Implementations§
Source§impl PresenceUpdate
impl PresenceUpdate
Sourcepub fn new() -> PresenceUpdate
pub fn new() -> PresenceUpdate
Creates a new PresenceUpdate with the offline presence state and no status.
Trait Implementations§
Source§impl Clone for PresenceUpdate
impl Clone for PresenceUpdate
Source§fn clone(&self) -> PresenceUpdate
fn clone(&self) -> PresenceUpdate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PresenceUpdate
impl Debug for PresenceUpdate
Source§impl Default for PresenceUpdate
impl Default for PresenceUpdate
Source§fn default() -> PresenceUpdate
fn default() -> PresenceUpdate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PresenceUpdate
impl<'de> Deserialize<'de> for PresenceUpdate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PresenceUpdate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PresenceUpdate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PresenceUpdate
impl Serialize for PresenceUpdate
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Forget for PresenceUpdate
impl Freeze for PresenceUpdate
impl Move for PresenceUpdate
impl RefUnwindSafe for PresenceUpdate
impl Send for PresenceUpdate
impl Sync for PresenceUpdate
impl Unpin for PresenceUpdate
impl UnsafeUnpin for PresenceUpdate
impl UnwindSafe for PresenceUpdate
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