Struct serenity::model::gateway::Presence [−][src]
#[non_exhaustive]pub struct Presence { pub activities: Vec<Activity>, pub client_status: Option<ClientStatus>, pub last_modified: Option<u64>, pub status: OnlineStatus, pub user_id: UserId, pub user: Option<User>, }
Expand description
Information detailing the current online status of a User
.
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.activities: Vec<Activity>
Expand description
User
’s current activities.
client_status: Option<ClientStatus>
Expand description
The devices a user are currently active on, if available.
last_modified: Option<u64>
Expand description
The date of the last presence update.
status: OnlineStatus
Expand description
The user’s online status.
user_id: UserId
Expand description
The Id of the User
. Can be used to calculate the user’s creation
date.
user: Option<User>
Expand description
The associated user instance.
Trait Implementations
impl<'de> Deserialize<'de> for Presence
[src]
impl<'de> Deserialize<'de> for Presence
[src]fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> StdResult<Presence, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> StdResult<Presence, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Presence
impl Send for Presence
impl Sync for Presence
impl Unpin for Presence
impl UnwindSafe for Presence
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,