pub struct InMemoryCache { /* private fields */ }Expand description
In-memory cache for Discord entities with Time-To-Live (TTL).
Implementations§
Trait Implementations§
Source§impl Cache for InMemoryCache
impl Cache for InMemoryCache
fn guild(&self, id: Snowflake) -> Option<Guild<'static>>
fn channel(&self, id: Snowflake) -> Option<Channel<'static>>
fn user(&self, id: Snowflake) -> Option<User<'static>>
fn member( &self, guild_id: Snowflake, user_id: Snowflake, ) -> Option<GuildMember<'static>>
fn role(&self, id: Snowflake) -> Option<Role<'static>>
fn insert_guild(&self, guild: Guild<'static>)
fn insert_channel(&self, channel: Channel<'static>)
fn insert_user(&self, user: User<'static>)
fn insert_member(&self, guild_id: Snowflake, member: GuildMember<'static>)
fn insert_role(&self, id: Snowflake, role: Role<'static>)
Auto Trait Implementations§
impl Freeze for InMemoryCache
impl !RefUnwindSafe for InMemoryCache
impl Send for InMemoryCache
impl Sync for InMemoryCache
impl Unpin for InMemoryCache
impl UnwindSafe for InMemoryCache
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