pub struct LogFile { /* private fields */ }
Expand description
A representation of a journal log file. Can then be read using a [JournalFileReader].
Implementations§
Source§impl LogFile
impl LogFile
Sourcepub fn is_match(name: &str) -> bool
pub fn is_match(name: &str) -> bool
Checks if the given file name (including the extension) matches that of a journal log file.
Sourcepub fn create_blocking_reader(&self) -> Result<LogFileReader, LogFileError>
pub fn create_blocking_reader(&self) -> Result<LogFileReader, LogFileError>
Creates a new reader using the path of the journal log file.
Sourcepub fn create_live_blocking_reader(
&self,
) -> Result<LiveLogFileReader, LiveLogFileReaderError>
pub fn create_live_blocking_reader( &self, ) -> Result<LiveLogFileReader, LiveLogFileReaderError>
Creates a new live reader using the path of the journal log file.
pub async fn create_async_reader(&self) -> Result<LogFileReader, LogFileError>
Available on crate feature
asynchronous
only.pub async fn create_live_async_reader( &self, ) -> Result<LiveLogFileReader, LiveLogFileReaderError>
Available on crate feature
asynchronous
only.Sourcepub fn date_time(&self) -> &NaiveDateTime
pub fn date_time(&self) -> &NaiveDateTime
Returns the date time that is part of the file name of the file.
Trait Implementations§
Source§impl Ord for LogFile
impl Ord for LogFile
Source§impl PartialOrd for LogFile
impl PartialOrd for LogFile
impl Eq for LogFile
Auto Trait Implementations§
impl Freeze for LogFile
impl RefUnwindSafe for LogFile
impl Send for LogFile
impl Sync for LogFile
impl Unpin for LogFile
impl UnwindSafe for LogFile
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