pub struct JournalRecord {
pub v: u32,
pub ts: DateTime<Utc>,
pub seq: String,
pub agent: Agent,
pub session_id: String,
pub body: JournalBody,
}Expand description
One journal line: a hook event, stamped.
Fields§
§v: u32The format version, RECORD_VERSION.
ts: DateTime<Utc>When the hook fired (see EventStamp::ts).
seq: StringThe event’s nonce (see EventStamp::seq).
agent: AgentWhich agent’s hook wrote it; also names the journal’s directory.
session_id: StringThe session the event belongs to; also names the journal file.
body: JournalBodyWhat happened.
Implementations§
Source§impl JournalRecord
impl JournalRecord
Sourcepub fn observe(req: &ObserveRequest, stamp: &EventStamp) -> Self
pub fn observe(req: &ObserveRequest, stamp: &EventStamp) -> Self
The record for an observe the sink is about to send.
Sourcepub fn end(
agent: Agent,
session_id: &str,
reason: Option<&str>,
pid: Option<u32>,
stamp: &EventStamp,
) -> Self
pub fn end( agent: Agent, session_id: &str, reason: Option<&str>, pid: Option<u32>, stamp: &EventStamp, ) -> Self
The record for a SessionEnd the sink is about to send.
Sourcepub fn stamp(&self) -> EventStamp
pub fn stamp(&self) -> EventStamp
This record’s EventStamp.
Sourcepub fn to_observe_request(&self) -> Option<ObserveRequest>
pub fn to_observe_request(&self) -> Option<ObserveRequest>
The observe this record replays as, or None for an end.
Trait Implementations§
Source§impl Clone for JournalRecord
impl Clone for JournalRecord
Source§impl Debug for JournalRecord
impl Debug for JournalRecord
Source§impl<'de> Deserialize<'de> for JournalRecord
impl<'de> Deserialize<'de> for JournalRecord
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 Eq for JournalRecord
Source§impl PartialEq for JournalRecord
impl PartialEq for JournalRecord
Source§impl Serialize for JournalRecord
impl Serialize for JournalRecord
impl StructuralPartialEq for JournalRecord
Auto Trait Implementations§
impl Freeze for JournalRecord
impl RefUnwindSafe for JournalRecord
impl Send for JournalRecord
impl Sync for JournalRecord
impl Unpin for JournalRecord
impl UnsafeUnpin for JournalRecord
impl UnwindSafe for JournalRecord
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
Converts
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> ⓘ
Converts
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