pub struct Tag<'repo> { /* private fields */ }
Expand description
A structure to represent a git tag
Implementations§
source§impl<'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] ⓘ
pub fn name_bytes(&self) -> &[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