Skip to main content

RawLine

Struct RawLine 

Source
pub struct RawLine<'a> {
    pub uuid: Option<&'a str>,
    pub timestamp: Option<&'a str>,
    pub idle_pct: Option<&'a str>,
    pub level: Option<LogLevel>,
    pub source: Option<&'a str>,
    pub message: &'a str,
    pub kind: LineKind,
}
Expand description

Zero-copy result of parsing a single log line.

Fields are None when the line’s format doesn’t include them (e.g. a BareContinuation has no uuid, timestamp, level, or source). The message field always contains the remaining text.

Fields§

§uuid: Option<&'a str>

Session UUID, present for Full, UuidContinuation, and Truncated lines.

§timestamp: Option<&'a str>

Microsecond-precision timestamp, present only for Full and System lines.

§idle_pct: Option<&'a str>

Core scheduler idle percentage (e.g. "95.97%"), a system health indicator.

§level: Option<LogLevel>

Log severity, present only for Full and System lines.

§source: Option<&'a str>

Source file and line (e.g. "sofia.c:7624"), present only for Full and System lines.

§message: &'a str

The message text after all structured fields have been consumed.

§kind: LineKind

Which of the five line formats this line matched.

Trait Implementations§

Source§

impl<'a> Debug for RawLine<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> PartialEq for RawLine<'a>

Source§

fn eq(&self, other: &RawLine<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> Eq for RawLine<'a>

Source§

impl<'a> StructuralPartialEq for RawLine<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for RawLine<'a>

§

impl<'a> RefUnwindSafe for RawLine<'a>

§

impl<'a> Send for RawLine<'a>

§

impl<'a> Sync for RawLine<'a>

§

impl<'a> Unpin for RawLine<'a>

§

impl<'a> UnsafeUnpin for RawLine<'a>

§

impl<'a> UnwindSafe for RawLine<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.