Struct cargo::ops::CleanContext
source · pub struct CleanContext<'cfg> {
pub config: &'cfg Config,
pub dry_run: bool,
/* private fields */
}
Fields§
§config: &'cfg Config
§dry_run: bool
Implementations§
source§impl<'cfg> CleanContext<'cfg>
impl<'cfg> CleanContext<'cfg>
pub fn new(config: &'cfg Config) -> Self
pub fn rm_rf(&mut self, path: &Path) -> CargoResult<()>
pub fn display_summary(&self) -> CargoResult<()>
sourcepub fn remove_paths(&mut self, paths: &[PathBuf]) -> CargoResult<()>
pub fn remove_paths(&mut self, paths: &[PathBuf]) -> CargoResult<()>
Deletes all of the given paths, showing a progress bar as it proceeds.
If any path does not exist, or is not accessible, this will not generate an error. This only generates an error for other issues, like not being able to write to the console.
Auto Trait Implementations§
impl<'cfg> !RefUnwindSafe for CleanContext<'cfg>
impl<'cfg> !Send for CleanContext<'cfg>
impl<'cfg> !Sync for CleanContext<'cfg>
impl<'cfg> Unpin for CleanContext<'cfg>
impl<'cfg> !UnwindSafe for CleanContext<'cfg>
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