pub struct Notice {Show 19 fields
pub id: String,
pub key: String,
pub severity: Severity,
pub message: String,
pub link: Option<Link>,
pub first_at: Timestamp,
pub last_at: Timestamp,
pub count: u32,
pub read_at: Option<Timestamp>,
pub dismissed_at: Option<Timestamp>,
pub subjects: Vec<String>,
pub related_run: Option<String>,
pub covered_by: Option<String>,
pub since: Option<Timestamp>,
pub cause: Option<String>,
pub schema: u32,
pub delivery_id: Option<String>,
pub generation: u32,
pub delivered: u32,
}Expand description
One thing the operator should know.
Fields§
§id: StringStable file-name-safe id derived from Notice::key.
key: StringDeduplication key: kind and subject, never prose.
severity: SeverityHow serious.
message: StringWhat happened.
link: Option<Link>Where it points, when it points anywhere.
first_at: TimestampFirst raised.
last_at: TimestampLast raised.
count: u32How many times this key was raised.
read_at: Option<Timestamp>When it was marked read.
dismissed_at: Option<Timestamp>When it was dismissed; the tombstone.
subjects: Vec<String>The task and run ids this notice is about. A question whose run
names one of them already pages the operator for the same cause.
Run association when the display link points elsewhere (for example a PR).
covered_by: Option<String>The question that carries this notice as context, when it was filed already read for that reason. Never a tombstone: a recurrence with a newer cause or higher severity is unread again.
since: Option<Timestamp>When the cause this notice reports began (a task’s held_at). A
question filed before it is about an older cause and does not cover
it; None keeps the broad coverage of notices without one.
cause: Option<String>Producer-defined cause identity (phase and immutable target), never prose.
schema: u32On-disk format version.
delivery_id: Option<String>Persistent incarnation, so pruning history cannot reuse a chat receipt. Legacy records keep their original receipt key.
generation: u32Delivery generation, advanced only by the shared page decision.
delivered: u32Last generation durably accepted by a chat.
Implementations§
Source§impl Notice
impl Notice
Sourcepub fn new(severity: Severity, key: &str, message: impl Into<String>) -> Self
pub fn new(severity: Severity, key: &str, message: impl Into<String>) -> Self
A notice of severity for key.
Sourcepub fn for_run(self, run: Option<String>) -> Self
pub fn for_run(self, run: Option<String>) -> Self
Associate a run independently of the display link.
Sourcepub fn cause(self, cause: impl Into<String>) -> Self
pub fn cause(self, cause: impl Into<String>) -> Self
Distinguish material producer state transitions without keying on wording.
Sourcepub fn raise_again(&mut self, again: &Notice, now: Timestamp) -> bool
pub fn raise_again(&mut self, again: &Notice, now: Timestamp) -> bool
Fold a repeat into this notice. Wording updates evidence; a newer cause or higher severity makes it unread and advances delivery.
Returns whether this raise should page the operator: it relit the notice (higher severity or newer cause) and no open question already carries it. This is the only place that decides.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Notice
impl<'de> Deserialize<'de> for Notice
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>,
Auto Trait Implementations§
impl Freeze for Notice
impl RefUnwindSafe for Notice
impl Send for Notice
impl Sync for Notice
impl Unpin for Notice
impl UnsafeUnpin for Notice
impl UnwindSafe for Notice
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
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>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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