pub struct NotificationEntry {Show 13 fields
pub id: u64,
pub severity: BannerSeverity,
pub priority: ToastPriority,
pub title: String,
pub body: Option<String>,
pub actions: Vec<ArchivedAction>,
pub timestamp: Timestamp,
pub group: Option<String>,
pub source: Option<String>,
pub read: bool,
pub dedup_id: Option<String>,
pub updates: Vec<NotificationUpdate>,
pub route: ToastRoute,
}Expand description
A single archived notification entry rendered by NotificationLog and
persisted under NotificationArchive::Persistent. Carries plain owned
fields only — no closures, no Rc<dyn Fn> — so it is Serialize-friendly.
Fields§
§id: u64Stable per-archive id (separate from the runtime Toast::id
dedup key — that one lives in dedup_id below). Assigned by
the archive on first push; never reused.
severity: BannerSeveritySeverity at the time of the original push. Drives the log’s row glyph + severity-chip filter.
priority: ToastPriority§title: StringResolved title (LocalizedString::resolve_now() snapshot).
body: Option<String>§actions: Vec<ArchivedAction>§timestamp: TimestampWall-clock timestamp at first push. The log’s day-bucket computation runs against this in the user’s local timezone.
group: Option<String>Optional grouping key for the log’s visual section headers.
source: Option<String>Optional originating-feature tag (e.g. "build", "sync").
Surfaced as a chip in the log row.
read: boolFlipped when the user opens the log popover. Drives the bell
badge’s unread_count signal.
dedup_id: Option<String>Toast::id(...) value, if any — used for update-in-place
merge logic. New entries with a matching dedup_id append
to the existing entry’s updates list rather than creating
a separate row.
updates: Vec<NotificationUpdate>In-place updates from subsequent Toast::id(...) presents.
Empty on a freshly-pushed entry.
route: ToastRouteMirrored from the originating LiveEntry::route (see
ToastRegistry::entry_to_archive) — drives which bell(s) show
this entry and which bell’s “mark all read” / “clear” affects
it. Defaults to ToastRoute::Broadcast on deserialization
when the field is absent (a notifications.toml written before
this feature existed): treating pre-upgrade history as
broadcast keeps it visible in every window’s bell, rather than
it silently vanishing from all of them the moment routing scopes
are introduced.
Trait Implementations§
Source§impl Clone for NotificationEntry
impl Clone for NotificationEntry
Source§fn clone(&self) -> NotificationEntry
fn clone(&self) -> NotificationEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NotificationEntry
impl Debug for NotificationEntry
Source§impl<'de> Deserialize<'de> for NotificationEntry
impl<'de> Deserialize<'de> for NotificationEntry
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>,
Source§impl Keyed for NotificationEntry
Keyed by the stable, never-reused archive id (not the transient
dedup_id, which is only used to find the row to merge into — see
NotificationArchiveModel::push).
This is what lets PersistedListModel
merge a peer process’s concurrent archive write by row identity
instead of by whole-document snapshot.
impl Keyed for NotificationEntry
Keyed by the stable, never-reused archive id (not the transient
dedup_id, which is only used to find the row to merge into — see
NotificationArchiveModel::push).
This is what lets PersistedListModel
merge a peer process’s concurrent archive write by row identity
instead of by whole-document snapshot.
Source§impl PartialEq for NotificationEntry
impl PartialEq for NotificationEntry
Source§fn eq(&self, other: &NotificationEntry) -> bool
fn eq(&self, other: &NotificationEntry) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for NotificationEntry
impl Serialize for NotificationEntry
impl StructuralPartialEq for NotificationEntry
Auto Trait Implementations§
impl Freeze for NotificationEntry
impl RefUnwindSafe for NotificationEntry
impl Send for NotificationEntry
impl Sync for NotificationEntry
impl Unpin for NotificationEntry
impl UnsafeUnpin for NotificationEntry
impl UnwindSafe for NotificationEntry
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more