Struct twilight_cache_inmemory::model::CachedMember
source · 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 Clone for CachedMember
impl Clone for CachedMember
source§fn clone(&self) -> CachedMember
fn clone(&self) -> CachedMember
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 CachedMember
impl Debug for CachedMember
source§impl PartialEq<CachedMember> for CachedMember
impl PartialEq<CachedMember> for CachedMember
source§fn eq(&self, other: &CachedMember) -> bool
fn eq(&self, other: &CachedMember) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialEq<InteractionMember> for CachedMember
impl PartialEq<InteractionMember> for CachedMember
source§fn eq(&self, other: &InteractionMember) -> bool
fn eq(&self, other: &InteractionMember) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialEq<Member> for CachedMember
impl PartialEq<Member> for CachedMember
source§impl PartialEq<PartialMember> for CachedMember
impl PartialEq<PartialMember> for CachedMember
source§fn eq(&self, other: &PartialMember) -> bool
fn eq(&self, other: &PartialMember) -> bool
This method tests for
self and other values to be equal, and is used
by ==.