#[non_exhaustive]pub struct CachedPresence {
pub guild_id: GuildId,
pub user_id: UserId,
pub status: Status,
pub client_status: ClientStatus,
pub activities: Box<[Activity]>,
}Expand description
A cached presence: a member’s status and activities (D-164).
It keeps its user’s ID only; the user’s data lives in the user resource. The activities are the model’s, complete, in a boxed slice. Offline members have no cached presence.
See the presence update.
discord.js counterpart: Presence.
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.guild_id: GuildIdThe guild the presence is in.
user_id: UserIdThe user the presence is of.
status: StatusThe overall status.
client_status: ClientStatusThe status on each platform.
activities: Box<[Activity]>The current activities.
Trait Implementations§
Source§impl Clone for CachedPresence
impl Clone for CachedPresence
Source§impl Debug for CachedPresence
impl Debug for CachedPresence
Source§impl PartialEq for CachedPresence
impl PartialEq for CachedPresence
impl StructuralPartialEq for CachedPresence
Auto Trait Implementations§
impl Freeze for CachedPresence
impl RefUnwindSafe for CachedPresence
impl Send for CachedPresence
impl Sync for CachedPresence
impl Unpin for CachedPresence
impl UnsafeUnpin for CachedPresence
impl UnwindSafe for CachedPresence
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