pub struct JobHistoryStore { /* private fields */ }Expand description
A bounded, newest-first store of concluded jobs. Lazily loaded; a corrupt
jobs.json is quarantined and the store starts empty rather than failing.
Implementations§
Source§impl JobHistoryStore
impl JobHistoryStore
Sourcepub fn new(directory: &Path, limit: usize) -> Self
pub fn new(directory: &Path, limit: usize) -> Self
A store rooted at directory, keeping at most limit jobs (floored at 1).
Sourcepub fn with_default_limit(directory: &Path) -> Self
pub fn with_default_limit(directory: &Path) -> Self
A store with the default limit of 50 jobs.
Sourcepub fn set_limit(&mut self, limit: usize)
pub fn set_limit(&mut self, limit: usize)
Set the retention limit (floored at 1). Takes effect on the next record.
Auto Trait Implementations§
impl Freeze for JobHistoryStore
impl RefUnwindSafe for JobHistoryStore
impl Send for JobHistoryStore
impl Sync for JobHistoryStore
impl Unpin for JobHistoryStore
impl UnsafeUnpin for JobHistoryStore
impl UnwindSafe for JobHistoryStore
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