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> PartialOrd for Format<'a>
impl<'a> PartialOrd for Format<'a>
impl<'a> Eq for Format<'a>
impl<'a> StructuralPartialEq for Format<'a>
Auto Trait Implementations§
impl<'a> Freeze for Format<'a>
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