pub struct UpdatePresence {
pub d: UpdatePresencePayload,
pub op: OpCode,
}
Fields§
§d: UpdatePresencePayload
§op: OpCode
Implementations§
Source§impl UpdatePresence
impl UpdatePresence
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 new, valid UpdatePresence
payload.
§Errors
Returns an error of type UpdatePresenceErrorType::MissingActivity
if
an empty set of activities is provided.
Trait Implementations§
Source§impl Clone for UpdatePresence
impl Clone for UpdatePresence
Source§fn clone(&self) -> UpdatePresence
fn clone(&self) -> UpdatePresence
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 UpdatePresence
impl Debug for UpdatePresence
Source§impl<'de> Deserialize<'de> for UpdatePresence
impl<'de> Deserialize<'de> for UpdatePresence
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 UpdatePresence
impl Hash for UpdatePresence
Source§impl PartialEq for UpdatePresence
impl PartialEq for UpdatePresence
Source§impl Serialize for UpdatePresence
impl Serialize for UpdatePresence
impl Eq for UpdatePresence
impl StructuralPartialEq for UpdatePresence
Auto Trait Implementations§
impl Freeze for UpdatePresence
impl RefUnwindSafe for UpdatePresence
impl Send for UpdatePresence
impl Sync for UpdatePresence
impl Unpin for UpdatePresence
impl UnwindSafe for UpdatePresence
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