pub struct UpdatePresencePayload {
pub activities: Vec<Activity>,
pub afk: bool,
pub since: Option<u64>,
pub status: Status,
}
Fields§
§activities: Vec<Activity>
User’s activities.
At least one is required.
afk: bool
§since: Option<u64>
§status: Status
Implementations§
Source§impl UpdatePresencePayload
impl UpdatePresencePayload
Sourcepub fn new(
activities: impl Into<Vec<Activity>>,
afk: bool,
since: impl Into<Option<u64>>,
status: impl Into<Status>,
) -> Result<Self, UpdatePresenceError>
pub fn new( activities: impl Into<Vec<Activity>>, afk: bool, since: impl Into<Option<u64>>, status: impl Into<Status>, ) -> Result<Self, UpdatePresenceError>
Create a validated stats update info struct.
§Errors
Returns an UpdatePresenceErrorType::MissingActivity
error type if an
empty set of activities is provided.
Trait Implementations§
Source§impl Clone for UpdatePresencePayload
impl Clone for UpdatePresencePayload
Source§fn clone(&self) -> UpdatePresencePayload
fn clone(&self) -> UpdatePresencePayload
Returns a copy of the value. Read more
1.0.0 · 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 UpdatePresencePayload
impl Debug for UpdatePresencePayload
Source§impl<'de> Deserialize<'de> for UpdatePresencePayload
impl<'de> Deserialize<'de> for UpdatePresencePayload
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 Hash for UpdatePresencePayload
impl Hash for UpdatePresencePayload
Source§impl PartialEq for UpdatePresencePayload
impl PartialEq for UpdatePresencePayload
Source§impl Serialize for UpdatePresencePayload
impl Serialize for UpdatePresencePayload
impl Eq for UpdatePresencePayload
impl StructuralPartialEq for UpdatePresencePayload
Auto Trait Implementations§
impl Freeze for UpdatePresencePayload
impl RefUnwindSafe for UpdatePresencePayload
impl Send for UpdatePresencePayload
impl Sync for UpdatePresencePayload
impl Unpin for UpdatePresencePayload
impl UnwindSafe for UpdatePresencePayload
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