CacheableMember

Trait CacheableMember 

Source
pub trait CacheableMember:
    From<Member>
    + From<ComputedInteractionMember>
    + From<(Id<UserMarker>, PartialMember)>
    + PartialEq<Member>
    + PartialEq<PartialMember>
    + PartialEq<InteractionMember>
    + PartialEq<Self>
    + Clone
    + Debug {
    // Required methods
    fn roles(&self) -> &[Id<RoleMarker>];
    fn communication_disabled_until(&self) -> Option<Timestamp>;
    fn avatar(&self) -> Option<ImageHash>;
    fn deaf(&self) -> Option<bool>;
    fn mute(&self) -> Option<bool>;
    fn update_with_member_update(&mut self, member_update: &MemberUpdate);
}
Expand description

Trait for a generic cached representation of a Member.

Required Methods§

Source

fn roles(&self) -> &[Id<RoleMarker>]

Roles of this member.

Source

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 avatar(&self) -> Option<ImageHash>

Avatar of this member.

Source

fn deaf(&self) -> Option<bool>

Whether this member is deafened.

Source

fn mute(&self) -> Option<bool>

Whether this member is muted.

Source

fn update_with_member_update(&mut self, member_update: &MemberUpdate)

Update the cached data with a MemberUpdate event.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§