Struct git2::StashFlags
source · [−]pub struct StashFlags { /* private fields */ }
Implementations
sourceimpl StashFlags
impl StashFlags
pub const DEFAULT: StashFlags
sourcepub const KEEP_INDEX: StashFlags
pub const KEEP_INDEX: StashFlags
All changes already added to the index are left intact in the working directory
sourcepub const INCLUDE_UNTRACKED: StashFlags
pub const INCLUDE_UNTRACKED: StashFlags
All untracked files are also stashed and then cleaned up from the working directory
sourcepub const INCLUDE_IGNORED: StashFlags
pub const INCLUDE_IGNORED: StashFlags
All ignored files are also stashed and then cleaned up from the working directory
sourcepub const fn empty() -> StashFlags
pub const fn empty() -> StashFlags
Returns an empty set of flags
sourcepub const fn all() -> StashFlags
pub const fn all() -> StashFlags
Returns the set containing all flags.
sourcepub fn from_bits(bits: u32) -> Option<StashFlags>
pub fn from_bits(bits: u32) -> Option<StashFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u32) -> StashFlags
pub const fn from_bits_truncate(bits: u32) -> StashFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> StashFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> StashFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: StashFlags) -> bool
pub const fn intersects(&self, other: StashFlags) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: StashFlags) -> bool
pub const fn contains(&self, other: StashFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: StashFlags)
pub fn insert(&mut self, other: StashFlags)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: StashFlags)
pub fn remove(&mut self, other: StashFlags)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: StashFlags)
pub fn toggle(&mut self, other: StashFlags)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: StashFlags, value: bool)
pub fn set(&mut self, other: StashFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
sourceimpl StashFlags
impl StashFlags
pub fn is_default(&self) -> bool
pub fn is_keep_index(&self) -> bool
pub fn is_include_untracked(&self) -> bool
pub fn is_include_ignored(&self) -> bool
Trait Implementations
sourceimpl Binary for StashFlags
impl Binary for StashFlags
sourceimpl BitAnd<StashFlags> for StashFlags
impl BitAnd<StashFlags> for StashFlags
sourcefn bitand(self, other: StashFlags) -> StashFlags
fn bitand(self, other: StashFlags) -> StashFlags
Returns the intersection between the two sets of flags.
type Output = StashFlags
type Output = StashFlags
The resulting type after applying the &
operator.
sourceimpl BitAndAssign<StashFlags> for StashFlags
impl BitAndAssign<StashFlags> for StashFlags
sourcefn bitand_assign(&mut self, other: StashFlags)
fn bitand_assign(&mut self, other: StashFlags)
Disables all flags disabled in the set.
sourceimpl BitOr<StashFlags> for StashFlags
impl BitOr<StashFlags> for StashFlags
sourcefn bitor(self, other: StashFlags) -> StashFlags
fn bitor(self, other: StashFlags) -> StashFlags
Returns the union of the two sets of flags.
type Output = StashFlags
type Output = StashFlags
The resulting type after applying the |
operator.
sourceimpl BitOrAssign<StashFlags> for StashFlags
impl BitOrAssign<StashFlags> for StashFlags
sourcefn bitor_assign(&mut self, other: StashFlags)
fn bitor_assign(&mut self, other: StashFlags)
Adds the set of flags.
sourceimpl BitXor<StashFlags> for StashFlags
impl BitXor<StashFlags> for StashFlags
sourcefn bitxor(self, other: StashFlags) -> StashFlags
fn bitxor(self, other: StashFlags) -> StashFlags
Returns the left flags, but with all the right flags toggled.
type Output = StashFlags
type Output = StashFlags
The resulting type after applying the ^
operator.
sourceimpl BitXorAssign<StashFlags> for StashFlags
impl BitXorAssign<StashFlags> for StashFlags
sourcefn bitxor_assign(&mut self, other: StashFlags)
fn bitxor_assign(&mut self, other: StashFlags)
Toggles the set of flags.
sourceimpl Clone for StashFlags
impl Clone for StashFlags
sourcefn clone(&self) -> StashFlags
fn clone(&self) -> StashFlags
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 more
sourceimpl Debug for StashFlags
impl Debug for StashFlags
sourceimpl Default for StashFlags
impl Default for StashFlags
sourceimpl Extend<StashFlags> for StashFlags
impl Extend<StashFlags> for StashFlags
sourcefn extend<T: IntoIterator<Item = StashFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = StashFlags>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromIterator<StashFlags> for StashFlags
impl FromIterator<StashFlags> for StashFlags
sourcefn from_iter<T: IntoIterator<Item = StashFlags>>(iterator: T) -> StashFlags
fn from_iter<T: IntoIterator<Item = StashFlags>>(iterator: T) -> StashFlags
Creates a value from an iterator. Read more
sourceimpl Hash for StashFlags
impl Hash for StashFlags
sourceimpl LowerHex for StashFlags
impl LowerHex for StashFlags
sourceimpl Not for StashFlags
impl Not for StashFlags
sourcefn not(self) -> StashFlags
fn not(self) -> StashFlags
Returns the complement of this set of flags.
type Output = StashFlags
type Output = StashFlags
The resulting type after applying the !
operator.
sourceimpl Octal for StashFlags
impl Octal for StashFlags
sourceimpl Ord for StashFlags
impl Ord for StashFlags
sourceimpl PartialEq<StashFlags> for StashFlags
impl PartialEq<StashFlags> for StashFlags
sourcefn eq(&self, other: &StashFlags) -> bool
fn eq(&self, other: &StashFlags) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &StashFlags) -> bool
fn ne(&self, other: &StashFlags) -> bool
This method tests for !=
.
sourceimpl PartialOrd<StashFlags> for StashFlags
impl PartialOrd<StashFlags> for StashFlags
sourcefn partial_cmp(&self, other: &StashFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &StashFlags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
sourceimpl Sub<StashFlags> for StashFlags
impl Sub<StashFlags> for StashFlags
sourcefn sub(self, other: StashFlags) -> StashFlags
fn sub(self, other: StashFlags) -> StashFlags
Returns the set difference of the two sets of flags.
type Output = StashFlags
type Output = StashFlags
The resulting type after applying the -
operator.
sourceimpl SubAssign<StashFlags> for StashFlags
impl SubAssign<StashFlags> for StashFlags
sourcefn sub_assign(&mut self, other: StashFlags)
fn sub_assign(&mut self, other: StashFlags)
Disables all flags enabled in the set.
sourceimpl UpperHex for StashFlags
impl UpperHex for StashFlags
impl Copy for StashFlags
impl Eq for StashFlags
impl StructuralEq for StashFlags
impl StructuralPartialEq for StashFlags
Auto Trait Implementations
impl RefUnwindSafe for StashFlags
impl Send for StashFlags
impl Sync for StashFlags
impl Unpin for StashFlags
impl UnwindSafe for StashFlags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more