pub struct CachedMember { /* private fields */ }
Expand description
Represents a cached Member
.
Implementations§
Source§impl CachedMember
impl CachedMember
Sourcepub const fn communication_disabled_until(&self) -> Option<Timestamp>
pub const fn communication_disabled_until(&self) -> Option<Timestamp>
When the user can resume communication in a guild again.
Checking if this value is Some
is not enough to know if a used is currently
timed out as Discord doesn’t send any events when the timeout expires, and
therefore the cache is not updated accordingly. You should ensure that the
provided Timestamp
is not in the past. See discord-api-docs#4269.
Sourcepub const fn flags(&self) -> MemberFlags
pub const fn flags(&self) -> MemberFlags
Flags for the member.
Defaults to an empty bitfield.
Sourcepub const fn pending(&self) -> bool
pub const fn pending(&self) -> bool
Whether the member has not yet passed the guild’s Membership Screening requirements.
Timestamp
of the date the member boosted the guild.
Sourcepub fn roles(&self) -> &[Id<RoleMarker>]
pub fn roles(&self) -> &[Id<RoleMarker>]
List of role IDs this member has.
Sourcepub const fn user_id(&self) -> Id<UserMarker>
pub const fn user_id(&self) -> Id<UserMarker>
ID of the user relating to the member.
Trait Implementations§
Source§impl CacheableMember for CachedMember
impl CacheableMember for CachedMember
Source§fn roles(&self) -> &[Id<RoleMarker>]
fn roles(&self) -> &[Id<RoleMarker>]
Roles of this member.
Source§fn communication_disabled_until(&self) -> Option<Timestamp>
fn communication_disabled_until(&self) -> Option<Timestamp>
Available on crate feature
permission-calculator
only.Timestamp until which this member’s communication is disabled.
Source§fn update_with_member_update(&mut self, member_update: &MemberUpdate)
fn update_with_member_update(&mut self, member_update: &MemberUpdate)
Update the cached data with a
MemberUpdate
event.Source§impl Clone for CachedMember
impl Clone for CachedMember
Source§fn clone(&self) -> CachedMember
fn clone(&self) -> CachedMember
Returns a duplicate 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 CachedMember
impl Debug for CachedMember
Source§impl From<(Id<UserMarker>, PartialMember)> for CachedMember
impl From<(Id<UserMarker>, PartialMember)> for CachedMember
Source§fn from((user_id, member): (Id<UserMarker>, PartialMember)) -> Self
fn from((user_id, member): (Id<UserMarker>, PartialMember)) -> Self
Converts to this type from the input type.
Source§impl From<ComputedInteractionMember> for CachedMember
impl From<ComputedInteractionMember> for CachedMember
Source§fn from(member: ComputedInteractionMember) -> Self
fn from(member: ComputedInteractionMember) -> Self
Converts to this type from the input type.
Source§impl From<Member> for CachedMember
impl From<Member> for CachedMember
Source§impl PartialEq<InteractionMember> for CachedMember
impl PartialEq<InteractionMember> for CachedMember
Source§impl PartialEq<Member> for CachedMember
impl PartialEq<Member> for CachedMember
Source§impl PartialEq<PartialMember> for CachedMember
impl PartialEq<PartialMember> for CachedMember
Source§impl PartialEq for CachedMember
impl PartialEq for CachedMember
Source§impl Serialize for CachedMember
impl Serialize for CachedMember
impl Eq for CachedMember
impl StructuralPartialEq for CachedMember
Auto Trait Implementations§
impl Freeze for CachedMember
impl RefUnwindSafe for CachedMember
impl Send for CachedMember
impl Sync for CachedMember
impl Unpin for CachedMember
impl UnwindSafe for CachedMember
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