pub struct TrashRecordStore { /* private fields */ }Expand description
Storage for trash records
Implementations§
Source§impl TrashRecordStore
impl TrashRecordStore
Sourcepub fn load(&self) -> Result<Vec<TrashRecord>>
pub fn load(&self) -> Result<Vec<TrashRecord>>
Load all records
Sourcepub fn save(&self, records: &[TrashRecord]) -> Result<()>
pub fn save(&self, records: &[TrashRecord]) -> Result<()>
Save all records
Sourcepub fn add(&self, record: TrashRecord) -> Result<()>
pub fn add(&self, record: TrashRecord) -> Result<()>
Add a record
Sourcepub fn total_size(&self) -> Result<u64>
pub fn total_size(&self) -> Result<u64>
Get total size of tracked trash
Sourcepub fn get_old_records(&self, days: u32) -> Result<Vec<TrashRecord>>
pub fn get_old_records(&self, days: u32) -> Result<Vec<TrashRecord>>
Get records older than a certain number of days
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TrashRecordStore
impl RefUnwindSafe for TrashRecordStore
impl Send for TrashRecordStore
impl Sync for TrashRecordStore
impl Unpin for TrashRecordStore
impl UnwindSafe for TrashRecordStore
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more