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, config: &GlobalCleanConfig, unstable_allowed: bool, ) -> 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,
§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>
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>
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>
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§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>
impl<T> ErasedDestructor for Twhere
T: 'static,
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