pub struct AdapterFilter { /* private fields */ }Expand description
Which package managers a pass is allowed to act on.
The default allows everything. Built through AdapterFilter::new, which rejects
names no adapter answers to — a typo like --only pmpm silently matching nothing
looks exactly like “there was no bloat”, and that is the wrong thing to believe about
a tool that deletes directories.
Implementations§
Source§impl AdapterFilter
impl AdapterFilter
Sourcepub fn new(only: Option<&str>, skip: Option<&str>) -> Result<Self>
pub fn new(only: Option<&str>, skip: Option<&str>) -> Result<Self>
Build a filter from comma-separated --only / --skip values.
Names are matched case-insensitively. Listing the same adapter in both lists is a contradiction rather than a precedence puzzle, so it is rejected outright.
Sourcepub fn is_unrestricted(&self) -> bool
pub fn is_unrestricted(&self) -> bool
Whether the filter restricts anything at all.
Trait Implementations§
Source§impl Clone for AdapterFilter
impl Clone for AdapterFilter
Source§fn clone(&self) -> AdapterFilter
fn clone(&self) -> AdapterFilter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdapterFilter
impl Debug for AdapterFilter
Source§impl Default for AdapterFilter
impl Default for AdapterFilter
Source§fn default() -> AdapterFilter
fn default() -> AdapterFilter
Returns the “default value” for a type. Read more
Source§impl PartialEq for AdapterFilter
impl PartialEq for AdapterFilter
impl StructuralPartialEq for AdapterFilter
Auto Trait Implementations§
impl Freeze for AdapterFilter
impl RefUnwindSafe for AdapterFilter
impl Send for AdapterFilter
impl Sync for AdapterFilter
impl Unpin for AdapterFilter
impl UnsafeUnpin for AdapterFilter
impl UnwindSafe for AdapterFilter
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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