pub struct LogEntry {
pub timecode: Timecode,
pub level: LogLevel,
pub message: String,
pub category: Option<String>,
pub metadata: HashMap<String, String>,
pub wall_clock_secs: Option<i64>,
}Expand description
A single entry in the timecode log.
Fields§
§timecode: TimecodeThe timecode position of this event.
level: LogLevelSeverity level.
message: StringHuman-readable message.
category: Option<String>Optional category tag (e.g., “QC”, “EDITORIAL”, “AUDIO”).
metadata: HashMap<String, String>Optional metadata key-value pairs.
wall_clock_secs: Option<i64>Wall-clock timestamp when this entry was recorded (Unix seconds).
Implementations§
Source§impl LogEntry
impl LogEntry
Sourcepub fn new(
timecode: Timecode,
level: LogLevel,
message: impl Into<String>,
) -> Self
pub fn new( timecode: Timecode, level: LogLevel, message: impl Into<String>, ) -> Self
Create a new log entry.
Sourcepub fn with_category(self, category: impl Into<String>) -> Self
pub fn with_category(self, category: impl Into<String>) -> Self
Set the category tag.
Sourcepub fn with_meta(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_meta(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a metadata key-value pair.
Sourcepub fn with_wall_clock(self, secs: i64) -> Self
pub fn with_wall_clock(self, secs: i64) -> Self
Set the wall-clock timestamp.
Sourcepub fn format_line(&self) -> String
pub fn format_line(&self) -> String
Format the entry as a single log line.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogEntry
impl<'de> Deserialize<'de> for LogEntry
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 LogEntry
impl RefUnwindSafe for LogEntry
impl Send for LogEntry
impl Sync for LogEntry
impl Unpin for LogEntry
impl UnsafeUnpin for LogEntry
impl UnwindSafe for LogEntry
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