pub struct NormalizedAlert {
pub source: EventSource,
pub received_at: Timestamp,
pub body: EventBody,
pub raw: RawBytes,
pub image_url: Option<String>,
pub print: Option<ProviderPrint>,
pub detection: Option<Detection>,
pub signal: Option<PrinterSignal>,
}Expand description
One external body, read into an event under the adapter’s own kind.
kind and payload are the EventBody flattened into this shape, so an
alert’s wire form is the pair the store holds. print is what the
supervision domain correlates on; an alert about no print carries none.
Fields§
§source: EventSourceWhere it came from.
received_at: TimestampWhen it was received.
body: EventBodyThe kind and the payload, flattened into this shape’s own fields.
raw: RawBytesThe bytes exactly as received.
image_url: Option<String>The image this alert names, when it names one.
print: Option<ProviderPrint>The provider’s own identifier for the print this alert is about, and the file it named, when the alert is about a print at all.
detection: Option<Detection>What the provider’s detector did, when this alert is one of its detections.
signal: Option<PrinterSignal>What the printer itself signalled, when the alert relays a signal.
Implementations§
Trait Implementations§
Source§impl Clone for NormalizedAlert
impl Clone for NormalizedAlert
Source§impl Debug for NormalizedAlert
impl Debug for NormalizedAlert
Source§impl<'de> Deserialize<'de> for NormalizedAlert
impl<'de> Deserialize<'de> for NormalizedAlert
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 JsonSchema for NormalizedAlert
impl JsonSchema for NormalizedAlert
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for NormalizedAlert
impl PartialEq for NormalizedAlert
Source§impl Serialize for NormalizedAlert
impl Serialize for NormalizedAlert
impl StructuralPartialEq for NormalizedAlert
Auto Trait Implementations§
impl Forget for NormalizedAlert
impl Freeze for NormalizedAlert
impl Move for NormalizedAlert
impl RefUnwindSafe for NormalizedAlert
impl Send for NormalizedAlert
impl Sync for NormalizedAlert
impl Unpin for NormalizedAlert
impl UnsafeUnpin for NormalizedAlert
impl UnwindSafe for NormalizedAlert
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