pub struct EventFrame {
pub v: u8,
pub ts_us: i64,
pub kind: String,
pub source: String,
pub severity: Level,
pub detail: Fields,
}Expand description
One discrete event: a state transition, a radio lock change, a sidecar drop,
a pairing change, a transport error. kind is a dotted classifier.
Fields§
§v: u8Wire version.
ts_us: i64Microsecond epoch timestamp.
kind: StringDotted event classifier (e.g. service.transition, radio.lock).
source: StringEmitting component.
severity: LevelSeverity level.
detail: FieldsOpen detail map.
Implementations§
Source§impl EventFrame
impl EventFrame
Sourcepub fn new(
ts_us: i64,
kind: impl Into<String>,
source: impl Into<String>,
severity: Level,
) -> Self
pub fn new( ts_us: i64, kind: impl Into<String>, source: impl Into<String>, severity: Level, ) -> Self
Build an event stamped with the current wire version.
Sourcepub fn redact_detail(&mut self) -> bool
pub fn redact_detail(&mut self) -> bool
Redact every secret-bearing field in the detail map (idempotent). Returns
true if any field value was changed.
Trait Implementations§
Source§impl Clone for EventFrame
impl Clone for EventFrame
Source§impl Debug for EventFrame
impl Debug for EventFrame
Source§impl<'de> Deserialize<'de> for EventFrame
impl<'de> Deserialize<'de> for EventFrame
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 PartialEq for EventFrame
impl PartialEq for EventFrame
Source§impl Serialize for EventFrame
impl Serialize for EventFrame
impl StructuralPartialEq for EventFrame
Auto Trait Implementations§
impl Freeze for EventFrame
impl RefUnwindSafe for EventFrame
impl Send for EventFrame
impl Sync for EventFrame
impl Unpin for EventFrame
impl UnsafeUnpin for EventFrame
impl UnwindSafe for EventFrame
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