Struct grammers_session::ChatHashCache
source · pub struct ChatHashCache { /* private fields */ }
Expand description
In-memory chat cache, mapping peers to their respective access hashes.
Implementations§
source§impl ChatHashCache
impl ChatHashCache
pub fn new(self_user: Option<(i64, bool)>) -> Self
pub fn self_id(&self) -> i64
pub fn is_self_bot(&self) -> bool
pub fn set_self_user(&mut self, user: PackedChat)
pub fn get(&self, id: i64) -> Option<PackedChat>
pub fn extend(&mut self, users: &[User], chats: &[Chat]) -> bool
pub fn extend_from_updates(&mut self, updates: &Updates) -> bool
Auto Trait Implementations§
impl RefUnwindSafe for ChatHashCache
impl Send for ChatHashCache
impl Sync for ChatHashCache
impl Unpin for ChatHashCache
impl UnwindSafe for ChatHashCache
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