pub struct LogDir { /* private fields */ }
Expand description
Provides an abstraction for all the log files in the journal directory.
Implementations§
Source§impl LogDir
impl LogDir
pub fn new(dir_path: PathBuf) -> LogDir
pub fn path(&self) -> &Path
Sourcepub fn journal_logs(&self) -> Result<Vec<LogFile>, LogDirError>
pub fn journal_logs(&self) -> Result<Vec<LogFile>, LogDirError>
Returns a list of journal log files found in the directory in any order.
Sourcepub fn journal_logs_oldest_first(&self) -> Result<Vec<LogFile>, LogDirError>
pub fn journal_logs_oldest_first(&self) -> Result<Vec<LogFile>, LogDirError>
Returns a list of journal log files found in the directory, returning the oldest journal logs first.
Sourcepub fn journal_logs_newest_first(&self) -> Result<Vec<LogFile>, LogDirError>
pub fn journal_logs_newest_first(&self) -> Result<Vec<LogFile>, LogDirError>
Returns a list of journal log files found in the directory, returning the newest journal logs first.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogDir
impl RefUnwindSafe for LogDir
impl Send for LogDir
impl Sync for LogDir
impl Unpin for LogDir
impl UnwindSafe for LogDir
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