pub struct CachedMember {Show 22 fields
pub guild_avatar: Option<ImageHash>,
pub communication_disabled_until: Option<Timestamp>,
pub deaf: bool,
pub guild_id: Id<GuildMarker>,
pub joined_at: Timestamp,
pub mute: bool,
pub nick: Option<String>,
pub pending: bool,
pub premium_since: Option<Timestamp>,
pub accent_color: Option<u32>,
pub avatar: Option<ImageHash>,
pub banner: Option<ImageHash>,
pub bot: bool,
pub discriminator: u16,
pub flags: Option<UserFlags>,
pub id: Id<UserMarker>,
pub locale: Option<String>,
pub mfa_enabled: Option<bool>,
pub name: String,
pub premium_type: Option<PremiumType>,
pub public_flags: Option<UserFlags>,
pub system: Option<bool>,
}Expand description
A cached member
It’s the same as twilight_model::guild::member::Member except:
-
userfield is flattened andavatarfield is renamed toguild_avatarsince member users are rarely duplicates, making this struct easier to cache -
rolesfield is removed, as member roles are cached separately -
emailandverifiedfields are removed, as they’re only sent in some HTTP endpoints
Fields§
§guild_avatar: Option<ImageHash>§communication_disabled_until: Option<Timestamp>§deaf: bool§guild_id: Id<GuildMarker>§joined_at: Timestamp§mute: bool§nick: Option<String>§pending: bool§accent_color: Option<u32>§avatar: Option<ImageHash>§bot: bool§discriminator: u16§flags: Option<UserFlags>§id: Id<UserMarker>§locale: Option<String>§mfa_enabled: Option<bool>§name: String§public_flags: Option<UserFlags>§system: Option<bool>Implementations§
Source§impl CachedMember
impl CachedMember
Sourcepub fn communication_disabled(&self) -> Result<bool, ComponentRange>
pub fn communication_disabled(&self) -> Result<bool, ComponentRange>
Sourcepub fn update(&mut self, member: &MemberUpdate)
pub fn update(&mut self, member: &MemberUpdate)
Update the cached member with the partial member
Trait Implementations§
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
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