Struct gix_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>,
}
Available on crate feature
describe
only.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: ObjectId
The id
of the commit to describe.
hex_len: usize
The amount of hex characters to use to display id
.
depth: u32
The amount of commits between name
and id
, where id
is in the future of name
.
long: bool
If 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 for Format<'a>
impl<'a> PartialEq for Format<'a>
source§impl<'a> PartialOrd for Format<'a>
impl<'a> PartialOrd 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> 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more