#[non_exhaustive]pub struct Envelope {
pub source: String,
pub version: u32,
pub outcome: Outcome,
pub received: Option<i64>,
}Expand description
An outcome, and the source definition that produced it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source: StringThe source’s name, such as sysmon.
version: u32The version of the source definition.
outcome: OutcomeWhat became of the record.
received: Option<i64>When the platform took the record, in milliseconds since the Unix epoch, if the role that took it said. Envelopes written before this field existed have none.
Implementations§
Source§impl Envelope
impl Envelope
Sourcepub fn new(source: impl Into<String>, version: u32, outcome: Outcome) -> Self
pub fn new(source: impl Into<String>, version: u32, outcome: Outcome) -> Self
An envelope for outcome of the source source at definition
version version.
Sourcepub fn received_at(self, received: i64) -> Self
pub fn received_at(self, received: i64) -> Self
The same envelope, saying the platform took its record at
received milliseconds since the Unix epoch.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Envelope
impl<'de> Deserialize<'de> for Envelope
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
impl StructuralPartialEq for Envelope
Auto Trait Implementations§
impl Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnsafeUnpin for Envelope
impl UnwindSafe for Envelope
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