#[non_exhaustive]pub struct PruneOptions {
pub older_than: Option<SystemTime>,
pub dry_run: bool,
}Expand description
Options for prune_loose_objects.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.older_than: Option<SystemTime>When set, only delete unreachable loose objects strictly older than this time.
When None, uses gc.pruneExpire from repository config (default 2.weeks.ago).
dry_run: boolReport without deleting objects.
Implementations§
Source§impl PruneOptions
impl PruneOptions
Sourcepub fn with_older_than(older_than: Option<SystemTime>) -> Self
pub fn with_older_than(older_than: Option<SystemTime>) -> Self
Prune with an optional explicit cutoff (None uses gc.pruneExpire).
Trait Implementations§
Source§impl Clone for PruneOptions
impl Clone for PruneOptions
Source§impl Debug for PruneOptions
impl Debug for PruneOptions
Auto Trait Implementations§
impl Freeze for PruneOptions
impl RefUnwindSafe for PruneOptions
impl Send for PruneOptions
impl Sync for PruneOptions
impl Unpin for PruneOptions
impl UnsafeUnpin for PruneOptions
impl UnwindSafe for PruneOptions
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