Struct git2::ReferenceFormat
source · [−]pub struct ReferenceFormat { /* private fields */ }
Expand description
Options for Reference::normalize_name
.
Implementations
sourceimpl ReferenceFormat
impl ReferenceFormat
sourcepub const NORMAL: ReferenceFormat
pub const NORMAL: ReferenceFormat
No particular normalization.
sourcepub const ALLOW_ONELEVEL: ReferenceFormat
pub const ALLOW_ONELEVEL: ReferenceFormat
Constrol whether one-level refname are accepted (i.e., refnames that
do not contain multiple /
-separated components). Those are
expected to be written only using uppercase letters and underscore
(e.g. HEAD
, FETCH_HEAD
).
sourcepub const REFSPEC_PATTERN: ReferenceFormat
pub const REFSPEC_PATTERN: ReferenceFormat
Interpret the provided name as a reference pattern for a refspec (as
used with remote repositories). If this option is enabled, the name
is allowed to contain a single *
in place of a full pathname
components (e.g., foo/*/bar
but not foo/bar*
).
sourcepub const REFSPEC_SHORTHAND: ReferenceFormat
pub const REFSPEC_SHORTHAND: ReferenceFormat
Interpret the name as part of a refspec in shorthand form so the
ALLOW_ONELEVEL
naming rules aren’t enforced and main
becomes a
valid name.
sourcepub const fn empty() -> ReferenceFormat
pub const fn empty() -> ReferenceFormat
Returns an empty set of flags
sourcepub const fn all() -> ReferenceFormat
pub const fn all() -> ReferenceFormat
Returns the set containing all flags.
sourcepub fn from_bits(bits: u32) -> Option<ReferenceFormat>
pub fn from_bits(bits: u32) -> Option<ReferenceFormat>
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) -> ReferenceFormat
pub const fn from_bits_truncate(bits: u32) -> ReferenceFormat
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> ReferenceFormat
pub const unsafe fn from_bits_unchecked(bits: u32) -> ReferenceFormat
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: ReferenceFormat) -> bool
pub const fn intersects(&self, other: ReferenceFormat) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: ReferenceFormat) -> bool
pub const fn contains(&self, other: ReferenceFormat) -> bool
Returns true
all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: ReferenceFormat)
pub fn insert(&mut self, other: ReferenceFormat)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: ReferenceFormat)
pub fn remove(&mut self, other: ReferenceFormat)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: ReferenceFormat)
pub fn toggle(&mut self, other: ReferenceFormat)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: ReferenceFormat, value: bool)
pub fn set(&mut self, other: ReferenceFormat, value: bool)
Inserts or removes the specified flags depending on the passed value.
sourceimpl ReferenceFormat
impl ReferenceFormat
pub fn is_allow_onelevel(&self) -> bool
pub fn is_refspec_pattern(&self) -> bool
pub fn is_refspec_shorthand(&self) -> bool
Trait Implementations
sourceimpl Binary for ReferenceFormat
impl Binary for ReferenceFormat
sourceimpl BitAnd<ReferenceFormat> for ReferenceFormat
impl BitAnd<ReferenceFormat> for ReferenceFormat
sourcefn bitand(self, other: ReferenceFormat) -> ReferenceFormat
fn bitand(self, other: ReferenceFormat) -> ReferenceFormat
Returns the intersection between the two sets of flags.
type Output = ReferenceFormat
type Output = ReferenceFormat
The resulting type after applying the &
operator.
sourceimpl BitAndAssign<ReferenceFormat> for ReferenceFormat
impl BitAndAssign<ReferenceFormat> for ReferenceFormat
sourcefn bitand_assign(&mut self, other: ReferenceFormat)
fn bitand_assign(&mut self, other: ReferenceFormat)
Disables all flags disabled in the set.
sourceimpl BitOr<ReferenceFormat> for ReferenceFormat
impl BitOr<ReferenceFormat> for ReferenceFormat
sourcefn bitor(self, other: ReferenceFormat) -> ReferenceFormat
fn bitor(self, other: ReferenceFormat) -> ReferenceFormat
Returns the union of the two sets of flags.
type Output = ReferenceFormat
type Output = ReferenceFormat
The resulting type after applying the |
operator.
sourceimpl BitOrAssign<ReferenceFormat> for ReferenceFormat
impl BitOrAssign<ReferenceFormat> for ReferenceFormat
sourcefn bitor_assign(&mut self, other: ReferenceFormat)
fn bitor_assign(&mut self, other: ReferenceFormat)
Adds the set of flags.
sourceimpl BitXor<ReferenceFormat> for ReferenceFormat
impl BitXor<ReferenceFormat> for ReferenceFormat
sourcefn bitxor(self, other: ReferenceFormat) -> ReferenceFormat
fn bitxor(self, other: ReferenceFormat) -> ReferenceFormat
Returns the left flags, but with all the right flags toggled.
type Output = ReferenceFormat
type Output = ReferenceFormat
The resulting type after applying the ^
operator.
sourceimpl BitXorAssign<ReferenceFormat> for ReferenceFormat
impl BitXorAssign<ReferenceFormat> for ReferenceFormat
sourcefn bitxor_assign(&mut self, other: ReferenceFormat)
fn bitxor_assign(&mut self, other: ReferenceFormat)
Toggles the set of flags.
sourceimpl Clone for ReferenceFormat
impl Clone for ReferenceFormat
sourcefn clone(&self) -> ReferenceFormat
fn clone(&self) -> ReferenceFormat
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 ReferenceFormat
impl Debug for ReferenceFormat
sourceimpl Default for ReferenceFormat
impl Default for ReferenceFormat
sourceimpl Extend<ReferenceFormat> for ReferenceFormat
impl Extend<ReferenceFormat> for ReferenceFormat
sourcefn extend<T: IntoIterator<Item = ReferenceFormat>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = ReferenceFormat>>(&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<ReferenceFormat> for ReferenceFormat
impl FromIterator<ReferenceFormat> for ReferenceFormat
sourcefn from_iter<T: IntoIterator<Item = ReferenceFormat>>(
iterator: T
) -> ReferenceFormat
fn from_iter<T: IntoIterator<Item = ReferenceFormat>>(
iterator: T
) -> ReferenceFormat
Creates a value from an iterator. Read more
sourceimpl Hash for ReferenceFormat
impl Hash for ReferenceFormat
sourceimpl LowerHex for ReferenceFormat
impl LowerHex for ReferenceFormat
sourceimpl Not for ReferenceFormat
impl Not for ReferenceFormat
sourcefn not(self) -> ReferenceFormat
fn not(self) -> ReferenceFormat
Returns the complement of this set of flags.
type Output = ReferenceFormat
type Output = ReferenceFormat
The resulting type after applying the !
operator.
sourceimpl Octal for ReferenceFormat
impl Octal for ReferenceFormat
sourceimpl Ord for ReferenceFormat
impl Ord for ReferenceFormat
sourceimpl PartialEq<ReferenceFormat> for ReferenceFormat
impl PartialEq<ReferenceFormat> for ReferenceFormat
sourcefn eq(&self, other: &ReferenceFormat) -> bool
fn eq(&self, other: &ReferenceFormat) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ReferenceFormat) -> bool
fn ne(&self, other: &ReferenceFormat) -> bool
This method tests for !=
.
sourceimpl PartialOrd<ReferenceFormat> for ReferenceFormat
impl PartialOrd<ReferenceFormat> for ReferenceFormat
sourcefn partial_cmp(&self, other: &ReferenceFormat) -> Option<Ordering>
fn partial_cmp(&self, other: &ReferenceFormat) -> 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<ReferenceFormat> for ReferenceFormat
impl Sub<ReferenceFormat> for ReferenceFormat
sourcefn sub(self, other: ReferenceFormat) -> ReferenceFormat
fn sub(self, other: ReferenceFormat) -> ReferenceFormat
Returns the set difference of the two sets of flags.
type Output = ReferenceFormat
type Output = ReferenceFormat
The resulting type after applying the -
operator.
sourceimpl SubAssign<ReferenceFormat> for ReferenceFormat
impl SubAssign<ReferenceFormat> for ReferenceFormat
sourcefn sub_assign(&mut self, other: ReferenceFormat)
fn sub_assign(&mut self, other: ReferenceFormat)
Disables all flags enabled in the set.
sourceimpl UpperHex for ReferenceFormat
impl UpperHex for ReferenceFormat
impl Copy for ReferenceFormat
impl Eq for ReferenceFormat
impl StructuralEq for ReferenceFormat
impl StructuralPartialEq for ReferenceFormat
Auto Trait Implementations
impl RefUnwindSafe for ReferenceFormat
impl Send for ReferenceFormat
impl Sync for ReferenceFormat
impl Unpin for ReferenceFormat
impl UnwindSafe for ReferenceFormat
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