pub struct JournalEntry {
pub seqnum: u64,
pub realtime_us: u64,
pub monotonic_us: u64,
pub boot_id: [u8; 16],
pub fields: Vec<JournalField>,
}Expand description
A single parsed journal entry.
Fields§
§seqnum: u64§realtime_us: u64§monotonic_us: u64§boot_id: [u8; 16]§fields: Vec<JournalField>Implementations§
Source§impl JournalEntry
impl JournalEntry
Sourcepub fn realtime_as_datetime(&self) -> DateTime<Utc>
pub fn realtime_as_datetime(&self) -> DateTime<Utc>
Convert realtime_us (microseconds since Unix epoch) to a UTC DateTime.
Sourcepub fn field(&self, key: &str) -> Option<&str>
pub fn field(&self, key: &str) -> Option<&str>
Look up a text field by key name. Returns None if the key is absent
or if the value is binary.
Sourcepub fn priority(&self) -> Option<u8>
pub fn priority(&self) -> Option<u8>
Parse the PRIORITY field as a u8. Returns None if absent or unparseable.
Sourcepub fn syslog_identifier(&self) -> Option<&str>
pub fn syslog_identifier(&self) -> Option<&str>
Return the SYSLOG_IDENTIFIER field.
Trait Implementations§
Source§impl Clone for JournalEntry
impl Clone for JournalEntry
Source§fn clone(&self) -> JournalEntry
fn clone(&self) -> JournalEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JournalEntry
impl Debug for JournalEntry
Source§impl<'de> Deserialize<'de> for JournalEntry
impl<'de> Deserialize<'de> for JournalEntry
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
Auto Trait Implementations§
impl Freeze for JournalEntry
impl RefUnwindSafe for JournalEntry
impl Send for JournalEntry
impl Sync for JournalEntry
impl Unpin for JournalEntry
impl UnsafeUnpin for JournalEntry
impl UnwindSafe for JournalEntry
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