pub struct Tag<'repo> { /* private fields */ }
Expand description
A structure to represent a git tag
Implementations
sourceimpl<'repo> Tag<'repo>
impl<'repo> Tag<'repo>
sourcepub fn message(&self) -> Option<&str>
pub fn message(&self) -> Option<&str>
Get the message of a tag
Returns None if there is no message or if it is not valid utf8
sourcepub fn message_bytes(&self) -> Option<&[u8]>
pub fn message_bytes(&self) -> Option<&[u8]>
Get the message of a tag
Returns None if there is no message
sourcepub fn name_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn name_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Get the name of a tag
sourcepub fn peel(&self) -> Result<Object<'repo>, Error>
pub fn peel(&self) -> Result<Object<'repo>, Error>
Recursively peel a tag until a non tag git_object is found
sourcepub fn tagger(&self) -> Option<Signature<'_>>
pub fn tagger(&self) -> Option<Signature<'_>>
Get the tagger (author) of a tag
If the author is unspecified, then None
is returned.
sourcepub fn target(&self) -> Result<Object<'repo>, Error>
pub fn target(&self) -> Result<Object<'repo>, Error>
Get the tagged object of a tag
This method performs a repository lookup for the given object and returns it
sourcepub fn target_type(&self) -> Option<ObjectType>
pub fn target_type(&self) -> Option<ObjectType>
Get the ObjectType of the tagged object of a tag
sourcepub fn into_object(self) -> Object<'repo>
pub fn into_object(self) -> Object<'repo>
Consumes Tag to be returned as an Object
Trait Implementations
Auto Trait Implementations
impl<'repo> RefUnwindSafe for Tag<'repo>
impl<'repo> !Send for Tag<'repo>
impl<'repo> !Sync for Tag<'repo>
impl<'repo> Unpin for Tag<'repo>
impl<'repo> UnwindSafe for Tag<'repo>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more