Struct autopush_common::db::NotificationRecord
source · pub struct NotificationRecord {
pub current_timestamp: Option<u64>,
pub chids: Option<HashSet<String>>,
/* private fields */
}
Expand description
A stored Notification record. This is a notification that is to be stored until the User Agent reconnects. These are then converted to publishable crate::db::Notification records.
Fields§
§current_timestamp: Option<u64>
Magic entry stored in the first Message record that indicates the highest non-topic timestamp we’ve read into
chids: Option<HashSet<String>>
Magic entry stored in the first Message record that indicates the valid channel id’s
Implementations§
source§impl NotificationRecord
impl NotificationRecord
sourcepub fn into_notif(self) -> Result<Notification>
pub fn into_notif(self) -> Result<Notification>
Convert the stored notifications into publishable notifications
sourcepub fn from_notif(uaid: &Uuid, val: Notification) -> Self
pub fn from_notif(uaid: &Uuid, val: Notification) -> Self
Convert from a publishable Notification to a stored notification
Trait Implementations§
source§impl Clone for NotificationRecord
impl Clone for NotificationRecord
source§fn clone(&self) -> NotificationRecord
fn clone(&self) -> NotificationRecord
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NotificationRecord
impl Debug for NotificationRecord
source§impl Default for NotificationRecord
impl Default for NotificationRecord
source§fn default() -> NotificationRecord
fn default() -> NotificationRecord
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for NotificationRecord
impl<'de> Deserialize<'de> for NotificationRecord
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
source§impl PartialEq for NotificationRecord
impl PartialEq for NotificationRecord
source§impl Serialize for NotificationRecord
impl Serialize for NotificationRecord
impl StructuralPartialEq for NotificationRecord
Auto Trait Implementations§
impl Freeze for NotificationRecord
impl RefUnwindSafe for NotificationRecord
impl Send for NotificationRecord
impl Sync for NotificationRecord
impl Unpin for NotificationRecord
impl UnwindSafe for NotificationRecord
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)