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 is_valid_name(tag_name: &str) -> bool
pub fn is_valid_name(tag_name: &str) -> bool
Determine whether a tag name is valid, meaning that (when prefixed with refs/tags/) that it is a valid reference name, and that any additional tag name restrictions are imposed (eg, it cannot start with a -).
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
Trait Implementations§
Auto Trait Implementations§
impl<'repo> Freeze for Tag<'repo>
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§
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