pub struct MergeAnalysis(/* private fields */);Expand description
The results of merge_analysis indicating the merge opportunities.
Implementationsยง
Sourceยงimpl MergeAnalysis
impl MergeAnalysis
Sourcepub const ANALYSIS_NONE: Self
pub const ANALYSIS_NONE: Self
No merge is possible.
Sourcepub const ANALYSIS_NORMAL: Self
pub const ANALYSIS_NORMAL: Self
A โnormalโ merge; both HEAD and the given merge input have diverged from their common ancestor. The divergent commits must be merged.
Sourcepub const ANALYSIS_UP_TO_DATE: Self
pub const ANALYSIS_UP_TO_DATE: Self
All given merge inputs are reachable from HEAD, meaning the repository is up-to-date and no merge needs to be performed.
Sourcepub const ANALYSIS_FASTFORWARD: Self
pub const ANALYSIS_FASTFORWARD: Self
The given merge input is a fast-forward from HEAD and no merge needs to be performed. Instead, the client can check out the given merge input.
Sourcepub const ANALYSIS_UNBORN: Self
pub const ANALYSIS_UNBORN: Self
The HEAD of the current repository is โunbornโ and does not point to a valid commit. No merge can be performed, but the caller may wish to simply set HEAD to the target commit(s).
Sourceยงimpl MergeAnalysis
impl MergeAnalysis
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> Self
pub const fn from_bits_retain(bits: u32) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesnโt
correspond to any named flag.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove wonโt truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&) of the bits in two flags values.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|) of the bits in two flags values.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference wonโt truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!) of the bits in a flags value, truncating the result.
Sourceยงimpl MergeAnalysis
impl MergeAnalysis
Sourcepub const fn iter(&self) -> Iter<MergeAnalysis>
pub const fn iter(&self) -> Iter<MergeAnalysis>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<MergeAnalysis>
pub const fn iter_names(&self) -> IterNames<MergeAnalysis>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementationsยง
Sourceยงimpl Binary for MergeAnalysis
impl Binary for MergeAnalysis
Sourceยงimpl BitAnd for MergeAnalysis
impl BitAnd for MergeAnalysis
Sourceยงimpl BitAndAssign for MergeAnalysis
impl BitAndAssign for MergeAnalysis
Sourceยงfn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&) of the bits in two flags values.
Sourceยงimpl BitOr for MergeAnalysis
impl BitOr for MergeAnalysis
Sourceยงfn bitor(self, other: MergeAnalysis) -> Self
fn bitor(self, other: MergeAnalysis) -> Self
The bitwise or (|) of the bits in two flags values.
Sourceยงtype Output = MergeAnalysis
type Output = MergeAnalysis
| operator.Sourceยงimpl BitOrAssign for MergeAnalysis
impl BitOrAssign for MergeAnalysis
Sourceยงfn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|) of the bits in two flags values.
Sourceยงimpl BitXor for MergeAnalysis
impl BitXor for MergeAnalysis
Sourceยงimpl BitXorAssign for MergeAnalysis
impl BitXorAssign for MergeAnalysis
Sourceยงfn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in two flags values.
Sourceยงimpl Clone for MergeAnalysis
impl Clone for MergeAnalysis
Sourceยงfn clone(&self) -> MergeAnalysis
fn clone(&self) -> MergeAnalysis
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSourceยงimpl Debug for MergeAnalysis
impl Debug for MergeAnalysis
Sourceยงimpl Extend<MergeAnalysis> for MergeAnalysis
impl Extend<MergeAnalysis> for MergeAnalysis
Sourceยงfn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|) of the bits in each flags value.
Sourceยงfn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Sourceยงfn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Sourceยงimpl Flags for MergeAnalysis
impl Flags for MergeAnalysis
Sourceยงconst FLAGS: &'static [Flag<MergeAnalysis>]
const FLAGS: &'static [Flag<MergeAnalysis>]
Sourceยงfn from_bits_retain(bits: u32) -> MergeAnalysis
fn from_bits_retain(bits: u32) -> MergeAnalysis
Sourceยงfn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Sourceยงfn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Sourceยงfn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Sourceยงfn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Sourceยงfn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS.Sourceยงfn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Sourceยงfn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Sourceยงfn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in two flags values.Sourceยงfn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!). Read moreSourceยงfn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in two flags values.Sourceยงfn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in two flags values.Sourceยงfn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!). Read moreSourceยงfn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in two flags values.Sourceยงfn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in a flags value, truncating the result.Sourceยงimpl FromIterator<MergeAnalysis> for MergeAnalysis
impl FromIterator<MergeAnalysis> for MergeAnalysis
Sourceยงfn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|) of the bits in each flags value.
Sourceยงimpl Hash for MergeAnalysis
impl Hash for MergeAnalysis
Sourceยงimpl IntoIterator for MergeAnalysis
impl IntoIterator for MergeAnalysis
Sourceยงimpl LowerHex for MergeAnalysis
impl LowerHex for MergeAnalysis
Sourceยงimpl Not for MergeAnalysis
impl Not for MergeAnalysis
Sourceยงimpl Octal for MergeAnalysis
impl Octal for MergeAnalysis
Sourceยงimpl Ord for MergeAnalysis
impl Ord for MergeAnalysis
Sourceยงfn cmp(&self, other: &MergeAnalysis) -> Ordering
fn cmp(&self, other: &MergeAnalysis) -> Ordering
1.21.0 ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงimpl PartialEq for MergeAnalysis
impl PartialEq for MergeAnalysis
Sourceยงimpl PartialOrd for MergeAnalysis
impl PartialOrd for MergeAnalysis
Sourceยงimpl PublicFlags for MergeAnalysis
impl PublicFlags for MergeAnalysis
Sourceยงimpl Sub for MergeAnalysis
impl Sub for MergeAnalysis
Sourceยงfn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference wonโt truncate other, but the ! operator will.
Sourceยงtype Output = MergeAnalysis
type Output = MergeAnalysis
- operator.Sourceยงimpl SubAssign for MergeAnalysis
impl SubAssign for MergeAnalysis
Sourceยงfn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference wonโt truncate other, but the ! operator will.