pub struct GcOpts {
pub max_src_age: Option<Duration>,
pub max_crate_age: Option<Duration>,
pub max_index_age: Option<Duration>,
pub max_git_co_age: Option<Duration>,
pub max_git_db_age: Option<Duration>,
pub max_src_size: Option<u64>,
pub max_crate_size: Option<u64>,
pub max_git_size: Option<u64>,
pub max_download_size: Option<u64>,
}
Expand description
Options to use for garbage collection.
Fields§
§max_src_age: Option<Duration>
The --max-src-age
CLI option.
max_crate_age: Option<Duration>
§max_index_age: Option<Duration>
The --max-index-age
CLI option.
max_git_co_age: Option<Duration>
The --max-git-co-age
CLI option.
max_git_db_age: Option<Duration>
The --max-git-db-age
CLI option.
max_src_size: Option<u64>
The --max-src-size
CLI option.
max_crate_size: Option<u64>
The --max-crate-size
CLI option.
max_git_size: Option<u64>
The --max-git-size
CLI option.
max_download_size: Option<u64>
The --max-download-size
CLI option.
Implementations§
source§impl GcOpts
impl GcOpts
sourcepub fn is_download_cache_opt_set(&self) -> bool
pub fn is_download_cache_opt_set(&self) -> bool
Returns whether any download cache cleaning options are set.
sourcepub fn is_download_cache_size_set(&self) -> bool
pub fn is_download_cache_size_set(&self) -> bool
Returns whether any download cache cleaning options based on size are set.
sourcepub fn set_max_download_age(&mut self, max_download_age: Duration)
pub fn set_max_download_age(&mut self, max_download_age: Duration)
Updates the GcOpts
to incorporate the specified max download age.
“Download” means any cached data that can be re-downloaded.
sourcepub fn update_for_auto_gc(&mut self, gctx: &GlobalContext) -> CargoResult<()>
pub fn update_for_auto_gc(&mut self, gctx: &GlobalContext) -> CargoResult<()>
Updates the configuration of this GcOpts
to incorporate the
settings from config.
fn update_for_auto_gc_config( &mut self, auto_config: &AutoConfig, ) -> CargoResult<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GcOpts
impl RefUnwindSafe for GcOpts
impl Send for GcOpts
impl Sync for GcOpts
impl Unpin for GcOpts
impl UnwindSafe for GcOpts
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 144 bytes