pub enum LogMessage<'a> {
Start {
fields: Option<Vec<Field<'a>>>,
id: u64,
level: VerbosityLevel,
parent: u64,
text: Cow<'a, str>,
type: ActivityType,
},
Stop {
id: u64,
},
Result {
fields: Vec<Field<'a>>,
id: u64,
type: ResultType,
},
Msg {
level: VerbosityLevel,
msg: Cow<'a, str>,
},
SetPhase {
phase: &'a str,
},
}
Expand description
The different types of log messages Nix’ internal-json
format can
represent.
Variants§
Implementations§
Source§impl<'a> LogMessage<'a>
impl<'a> LogMessage<'a>
Sourcepub fn from_json_str(s: &'a str) -> Result<Self, Error>
pub fn from_json_str(s: &'a str) -> Result<Self, Error>
Parses a given log message string into a LogMessage.
Trait Implementations§
Source§impl<'a> Clone for LogMessage<'a>
impl<'a> Clone for LogMessage<'a>
Source§fn clone(&self) -> LogMessage<'a>
fn clone(&self) -> LogMessage<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for LogMessage<'a>
impl<'a> Debug for LogMessage<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for LogMessage<'a>
impl<'de: 'a, 'a> Deserialize<'de> for LogMessage<'a>
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 Display for LogMessage<'_>
impl Display for LogMessage<'_>
Source§impl<'a> PartialEq for LogMessage<'a>
impl<'a> PartialEq for LogMessage<'a>
Source§impl<'a> Serialize for LogMessage<'a>
impl<'a> Serialize for LogMessage<'a>
impl<'a> Eq for LogMessage<'a>
impl<'a> StructuralPartialEq for LogMessage<'a>
Auto Trait Implementations§
impl<'a> Freeze for LogMessage<'a>
impl<'a> RefUnwindSafe for LogMessage<'a>
impl<'a> Send for LogMessage<'a>
impl<'a> Sync for LogMessage<'a>
impl<'a> Unpin for LogMessage<'a>
impl<'a> UnwindSafe for LogMessage<'a>
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