[][src]Struct git2::ReferenceFormat

pub struct ReferenceFormat { /* fields omitted */ }

Implementations

impl ReferenceFormat[src]

pub const NORMAL: ReferenceFormat[src]

No particular normalization.

pub const ALLOW_ONELEVEL: ReferenceFormat[src]

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).

pub const REFSPEC_PATTERN: ReferenceFormat[src]

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*).

pub const REFSPEC_SHORTHAND: ReferenceFormat[src]

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.

pub const fn empty() -> ReferenceFormat[src]

Returns an empty set of flags

pub const fn all() -> ReferenceFormat[src]

Returns the set containing all flags.

pub const fn bits(&self) -> u32[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u32) -> Option<ReferenceFormat>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: u32) -> ReferenceFormat[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: u32) -> ReferenceFormat[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: ReferenceFormat) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: ReferenceFormat) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: ReferenceFormat)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: ReferenceFormat)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: ReferenceFormat)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: ReferenceFormat, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

impl ReferenceFormat[src]

Trait Implementations

impl Binary for ReferenceFormat[src]

impl BitAnd<ReferenceFormat> for ReferenceFormat[src]

type Output = ReferenceFormat

The resulting type after applying the & operator.

pub fn bitand(self, other: ReferenceFormat) -> ReferenceFormat[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<ReferenceFormat> for ReferenceFormat[src]

pub fn bitand_assign(&mut self, other: ReferenceFormat)[src]

Disables all flags disabled in the set.

impl BitOr<ReferenceFormat> for ReferenceFormat[src]

type Output = ReferenceFormat

The resulting type after applying the | operator.

pub fn bitor(self, other: ReferenceFormat) -> ReferenceFormat[src]

Returns the union of the two sets of flags.

impl BitOrAssign<ReferenceFormat> for ReferenceFormat[src]

pub fn bitor_assign(&mut self, other: ReferenceFormat)[src]

Adds the set of flags.

impl BitXor<ReferenceFormat> for ReferenceFormat[src]

type Output = ReferenceFormat

The resulting type after applying the ^ operator.

pub fn bitxor(self, other: ReferenceFormat) -> ReferenceFormat[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<ReferenceFormat> for ReferenceFormat[src]

pub fn bitxor_assign(&mut self, other: ReferenceFormat)[src]

Toggles the set of flags.

impl Clone for ReferenceFormat[src]

impl Copy for ReferenceFormat[src]

impl Debug for ReferenceFormat[src]

impl Default for ReferenceFormat[src]

impl Eq for ReferenceFormat[src]

impl Extend<ReferenceFormat> for ReferenceFormat[src]

impl FromIterator<ReferenceFormat> for ReferenceFormat[src]

impl Hash for ReferenceFormat[src]

impl LowerHex for ReferenceFormat[src]

impl Not for ReferenceFormat[src]

type Output = ReferenceFormat

The resulting type after applying the ! operator.

pub fn not(self) -> ReferenceFormat[src]

Returns the complement of this set of flags.

impl Octal for ReferenceFormat[src]

impl Ord for ReferenceFormat[src]

impl PartialEq<ReferenceFormat> for ReferenceFormat[src]

impl PartialOrd<ReferenceFormat> for ReferenceFormat[src]

impl StructuralEq for ReferenceFormat[src]

impl StructuralPartialEq for ReferenceFormat[src]

impl Sub<ReferenceFormat> for ReferenceFormat[src]

type Output = ReferenceFormat

The resulting type after applying the - operator.

pub fn sub(self, other: ReferenceFormat) -> ReferenceFormat[src]

Returns the set difference of the two sets of flags.

impl SubAssign<ReferenceFormat> for ReferenceFormat[src]

pub fn sub_assign(&mut self, other: ReferenceFormat)[src]

Disables all flags enabled in the set.

impl UpperHex for ReferenceFormat[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.