pub struct Notice {Show 13 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 covered_by: Option<String>,
pub schema: 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.
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 changed message or higher severity is unread again.
schema: u32On-disk format version.
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 raise_again(&mut self, again: &Notice, now: Timestamp)
pub fn raise_again(&mut self, again: &Notice, now: Timestamp)
Fold a repeat of this notice into it. Always counts; only a changed message or a higher severity makes it unread and visible again.
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