pub struct Info<'a> {
pub specific: SpecificInfo<'a>,
pub source: Source,
}Expand description
Represents version control info for a crate.
Fields§
§specific: SpecificInfo<'a>Contains specific information about the version control system.
source: SourceRecords the source from which this Info was generated.
See the defintion of Source for more details.
Implementations§
Source§impl<'a> Info<'a>
impl<'a> Info<'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
Noneif the tag information could not be found. - Returns
Some(&[])if there are no tags associated with the commit.
Trait Implementations§
impl<'a> Copy for Info<'a>
impl<'a> Eq for Info<'a>
impl<'a> StructuralPartialEq for Info<'a>
Auto Trait Implementations§
impl<'a> Freeze for Info<'a>
impl<'a> RefUnwindSafe for Info<'a>
impl<'a> Send for Info<'a>
impl<'a> Sync for Info<'a>
impl<'a> Unpin for Info<'a>
impl<'a> UnwindSafe for Info<'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