pub struct InboxState {
pub read: HashSet<String>,
pub archived: HashSet<String>,
}Fields§
§read: HashSet<String>§archived: HashSet<String>Implementations§
Source§impl InboxState
impl InboxState
Sourcepub fn mark_archived(&mut self, id: &str)
pub fn mark_archived(&mut self, id: &str)
Mark notification as archived
Sourcepub fn is_archived(&self, id: &str) -> bool
pub fn is_archived(&self, id: &str) -> bool
Check if notification is archived
Sourcepub fn unread_count(&self, ids: &[String]) -> usize
pub fn unread_count(&self, ids: &[String]) -> usize
Get unread count from a list of notification IDs
Trait Implementations§
Source§impl Debug for InboxState
impl Debug for InboxState
Source§impl Default for InboxState
impl Default for InboxState
Source§fn default() -> InboxState
fn default() -> InboxState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InboxState
impl<'de> Deserialize<'de> for InboxState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InboxState
impl RefUnwindSafe for InboxState
impl Send for InboxState
impl Sync for InboxState
impl Unpin for InboxState
impl UnsafeUnpin for InboxState
impl UnwindSafe for InboxState
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