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 &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
pub fn name_bytes(&self) -> &[u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [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 OID 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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more