pub struct Cache { /* private fields */ }Implementations§
Source§impl Cache
impl Cache
pub async fn get_server(&self, id: ServerId) -> Option<Server>
pub async fn get_server_data<F, T>(&self, id: ServerId, f: F) -> Option<T>
pub async fn commit_server(&self, v: &Server)
Source§impl Cache
impl Cache
pub async fn patch_server( &self, server_id: ServerId, patch: impl FnOnce() -> PartialServer, remove: Option<ServerField>, )
pub async fn delete_server(&self, server_id: ServerId)
pub async fn get_servers_aggregate<T, F>(&self, f: F) -> Twhere
F: FnOnce(ServerIter<'_>) -> T,
Source§impl Cache
impl Cache
pub async fn get_server_of_role(&self, id: RoleId) -> Option<ServerId>
pub async fn patch_role( &self, server_id: ServerId, role_id: RoleId, patch: impl FnOnce() -> PartialRole, remove: Option<RoleField>, )
pub async fn delete_role(&self, id: ServerId, role: RoleId)
Source§impl Cache
impl Cache
pub async fn get_member(&self, id: MemberId) -> Option<Member>
pub async fn get_member_data<F, T>(&self, id: MemberId, f: F) -> Option<T>
pub async fn commit_member(&self, v: &Member)
Source§impl Cache
impl Cache
pub async fn patch_member( &self, member_id: MemberId, patch: impl FnOnce() -> PartialMember, remove: Option<MemberField>, )
pub async fn get_members_aggregate<T, F>(&self, f: F) -> Twhere
F: FnOnce(MemberIter<'_>) -> T,
Source§impl Cache
impl Cache
pub async fn commit_channel(&self, channel: &Channel)
pub async fn patch_channel( &self, channel_id: ChannelId, patch: impl FnOnce() -> PartialChannel, remove: Option<ChannelField>, )
pub async fn delete_channel(&self, channel_id: ChannelId)
pub async fn get_channels_aggregate<T, F>(&self, f: F) -> Twhere
F: FnOnce(ChannelIter<'_>) -> T,
Source§impl Cache
impl Cache
pub async fn get_message( &self, channel: ChannelId, message: MessageId, ) -> Option<Message>
pub async fn get_message_data<F, T>( &self, channel: ChannelId, message: MessageId, f: F, ) -> Option<T>
pub async fn commit_message(&self, message: &Message)
pub async fn patch_message( &self, channel_id: ChannelId, message_id: MessageId, patch: impl FnOnce() -> PartialMessage, )
pub async fn get_messages_aggregate<T, F>(
&self,
channel_id: ChannelId,
f: F,
) -> Option<T>where
F: FnOnce(MessageIter<'_>) -> T,
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Cache
impl !RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl !UnwindSafe for Cache
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