pub struct Repository { /* private fields */ }Expand description
A repository that organizes journal files by directory and origin
The repository maintains a three-level hierarchy:
Repository
└─ Directory (/var/log/journal)
└─ Origin (System, User(1000), etc.)
└─ Chain (ordered list of files)This structure allows efficient querying and management of journal files from multiple directories and origins.
Implementations§
Source§impl Repository
impl Repository
Sourcepub fn insert(&mut self, file: File) -> Result<(), RepositoryError>
pub fn insert(&mut self, file: File) -> Result<(), RepositoryError>
Insert a file into the appropriate directory/origin/chain
Sourcepub fn remove(&mut self, file: &File) -> Result<(), RepositoryError>
pub fn remove(&mut self, file: &File) -> Result<(), RepositoryError>
Remove a file and clean up empty chains/directories
Sourcepub fn remove_directory(&mut self, path: &str)
pub fn remove_directory(&mut self, path: &str)
Remove all files from a directory
Sourcepub fn find_files_in_range<C>(&self, start: Seconds, end: Seconds) -> C
pub fn find_files_in_range<C>(&self, start: Seconds, end: Seconds) -> C
Collect all files in the given time range
Trait Implementations§
Source§impl Default for Repository
impl Default for Repository
Source§fn default() -> Repository
fn default() -> Repository
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Repository
impl RefUnwindSafe for Repository
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnsafeUnpin for Repository
impl UnwindSafe for Repository
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