Enum clap::builder::Resettable
source · [−]pub enum Resettable<T> {
Value(T),
Reset,
}
Expand description
Clearable builder value
Variants
Value(T)
Overwrite builder value
Reset
Reset builder value
Trait Implementations
sourceimpl<T: Clone> Clone for Resettable<T>
impl<T: Clone> Clone for Resettable<T>
sourcefn clone(&self) -> Resettable<T>
fn clone(&self) -> Resettable<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Debug> Debug for Resettable<T>
impl<T: Debug> Debug for Resettable<T>
sourceimpl<T> From<Option<T>> for Resettable<T>
impl<T> From<Option<T>> for Resettable<T>
sourceimpl<T> From<T> for Resettable<T>
impl<T> From<T> for Resettable<T>
sourceimpl<T: Hash> Hash for Resettable<T>
impl<T: Hash> Hash for Resettable<T>
sourceimpl<T> IntoResettable<T> for Resettable<T>
impl<T> IntoResettable<T> for Resettable<T>
sourcefn into_resettable(self) -> Resettable<T>
fn into_resettable(self) -> Resettable<T>
Convert to the intended resettable type
sourceimpl<T: Ord> Ord for Resettable<T>
impl<T: Ord> Ord for Resettable<T>
sourcefn cmp(&self, other: &Resettable<T>) -> Ordering
fn cmp(&self, other: &Resettable<T>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: PartialEq> PartialEq<Resettable<T>> for Resettable<T>
impl<T: PartialEq> PartialEq<Resettable<T>> for Resettable<T>
sourcefn eq(&self, other: &Resettable<T>) -> bool
fn eq(&self, other: &Resettable<T>) -> bool
sourceimpl<T: PartialOrd> PartialOrd<Resettable<T>> for Resettable<T>
impl<T: PartialOrd> PartialOrd<Resettable<T>> for Resettable<T>
sourcefn partial_cmp(&self, other: &Resettable<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &Resettable<T>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for Resettable<T>
impl<T: Eq> Eq for Resettable<T>
impl<T> StructuralEq for Resettable<T>
impl<T> StructuralPartialEq for Resettable<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Resettable<T>where
T: RefUnwindSafe,
impl<T> Send for Resettable<T>where
T: Send,
impl<T> Sync for Resettable<T>where
T: Sync,
impl<T> Unpin for Resettable<T>where
T: Unpin,
impl<T> UnwindSafe for Resettable<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more