Struct git_revision::describe::Format
source · pub struct Format<'a> {
pub name: Option<Cow<'a, BStr>>,
pub id: ObjectId,
pub hex_len: usize,
pub depth: u32,
pub long: bool,
pub dirty_suffix: Option<String>,
}Expand description
A structure implementing Display, producing a git describe like string.
Fields§
§name: Option<Cow<'a, BStr>>The name of the branch or tag to display, as is.
If None, the id will be displayed as a fallback.
id: ObjectIdThe id of the commit to describe.
hex_len: usizeThe amount of hex characters to use to display id.
depth: u32The amount of commits between name and id, where id is in the future of name.
long: boolIf true, the long form of the describe string will be produced even if id lies directly on name,
hence has a depth of 0.
dirty_suffix: Option<String>If Some(suffix), it will be appended to the describe string.
This should be set if the working tree was determined to be dirty.
Implementations§
Trait Implementations§
source§impl<'a> Ord for Format<'a>
impl<'a> Ord for Format<'a>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq<Format<'a>> for Format<'a>
impl<'a> PartialEq<Format<'a>> for Format<'a>
source§impl<'a> PartialOrd<Format<'a>> for Format<'a>
impl<'a> PartialOrd<Format<'a>> for Format<'a>
1.0.0 · source§fn 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<'a> Eq for Format<'a>
impl<'a> StructuralEq for Format<'a>
impl<'a> StructuralPartialEq for Format<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Format<'a>
impl<'a> Send for Format<'a>
impl<'a> Sync for Format<'a>
impl<'a> Unpin for Format<'a>
impl<'a> UnwindSafe for Format<'a>
Blanket Implementations§
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more