#[non_exhaustive]pub enum SpecificInfo<'a> {
Git {
commit_hash: &'a str,
extra: Option<&'a ExtraData<'a>>,
},
Mercurial {
global_revision: &'a str,
extra: Option<&'a ExtraData<'a>>,
},
}
Expand description
Contains information which is specific to a version control program.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Git
Contains information about a git repository.
Fields
§
extra: Option<&'a ExtraData<'a>>
Extra metadata about the git repository, if available.
See the definition of GitExtraData
for more details.
Mercurial
Contains information about a Mercurial repository.
Implementations§
Source§impl<'a> SpecificInfo<'a>
impl<'a> SpecificInfo<'a>
Sourcepub const fn commit(&self) -> &str
pub const fn commit(&self) -> &str
Returns the full remote commit hash string from the SpecificInfo
for the
current commit which this crate was built from.
Returns the list of tags associated with the current commit.
- Returns
None
if the tag information could not be found. - Returns
Some(&[])
if there are no tags associated with the commit.
Trait Implementations§
Source§impl<'a> Clone for SpecificInfo<'a>
impl<'a> Clone for SpecificInfo<'a>
Source§fn clone(&self) -> SpecificInfo<'a>
fn clone(&self) -> SpecificInfo<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for SpecificInfo<'a>
impl<'a> Debug for SpecificInfo<'a>
Source§impl<'a> Hash for SpecificInfo<'a>
impl<'a> Hash for SpecificInfo<'a>
Source§impl<'a> PartialEq for SpecificInfo<'a>
impl<'a> PartialEq for SpecificInfo<'a>
impl<'a> Copy for SpecificInfo<'a>
impl<'a> Eq for SpecificInfo<'a>
impl<'a> StructuralPartialEq for SpecificInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for SpecificInfo<'a>
impl<'a> RefUnwindSafe for SpecificInfo<'a>
impl<'a> Send for SpecificInfo<'a>
impl<'a> Sync for SpecificInfo<'a>
impl<'a> Unpin for SpecificInfo<'a>
impl<'a> UnwindSafe for SpecificInfo<'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