pub struct LogLine {
pub log: String,
pub index: String,
pub date: String,
pub timestamp: String,
pub app: String,
pub severity: String,
pub function: String,
pub payload: String,
pub color: Option<(u8, u8, u8)>,
}Expand description
This struct contains a formated log with its info clasified in several fields
Fields
log: Stringindex: Stringdate: Stringtimestamp: Stringapp: Stringseverity: Stringfunction: Stringpayload: Stringcolor: Option<(u8, u8, u8)>Implementations
sourceimpl LogLine
impl LogLine
sourcepub fn columns() -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn columns() -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the available fields
sourcepub fn get(&self, key: &str) -> Option<&String>
pub fn get(&self, key: &str) -> Option<&String>
Gets the field value with the columns returned key
sourcepub fn values(&self) -> Vec<(&str, &String)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn values(&self) -> Vec<(&str, &String)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Gets a (key, value) like representation of some fields
sourcepub fn is_formated(&self) -> bool
pub fn is_formated(&self) -> bool
Check if the content of the lines is formatted
Trait Implementations
sourceimpl<'de> Deserialize<'de> for LogLine where
LogLine: Default,
impl<'de> Deserialize<'de> for LogLine where
LogLine: Default,
sourcefn 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
sourceimpl IntoIterator for LogLine
impl IntoIterator for LogLine
sourceimpl<'a> IntoIterator for &'a LogLine
impl<'a> IntoIterator for &'a LogLine
sourceimpl<'a> IntoIterator for &'a mut LogLine
impl<'a> IntoIterator for &'a mut LogLine
sourceimpl Ord for LogLine
impl Ord for LogLine
sourceimpl PartialOrd<LogLine> for LogLine
impl PartialOrd<LogLine> for LogLine
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Eq for LogLine
Auto Trait Implementations
impl RefUnwindSafe for LogLine
impl Send for LogLine
impl Sync for LogLine
impl Unpin for LogLine
impl UnwindSafe for LogLine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more