pub struct Tag<'repo> {
pub id: ObjectId,
pub data: Vec<u8>,
pub repo: &'repo Repository,
}Expand description
A decoded tag object with access to its owning repository.
Fields§
§id: ObjectIdThe id of the tree
data: Vec<u8>The fully decoded tag data
repo: &'repo RepositoryThe owning repository.
Implementations§
Source§impl<'repo> Tag<'repo>
impl<'repo> Tag<'repo>
Sourcepub fn decode(&self) -> Result<TagRef<'_>, Error>
pub fn decode(&self) -> Result<TagRef<'_>, Error>
Decode the entire tag object and return it for accessing all tag information.
This never allocates.
Note that the returned commit object does make lookup easy and should be used for successive calls to string-ish information to avoid decoding the object more than once.
Source§impl Tag<'_>
Remove Lifetime
impl Tag<'_>
Remove Lifetime
Sourcepub fn detached(&self) -> ObjectDetached
pub fn detached(&self) -> ObjectDetached
Create an owned instance of this object, copying our data in the process.
Sourcepub fn detach(self) -> ObjectDetached
pub fn detach(self) -> ObjectDetached
Sever the connection to the Repository and turn this instance into a standalone object.
Trait Implementations§
Source§impl<'repo> From<Tag<'repo>> for ObjectDetached
impl<'repo> From<Tag<'repo>> for ObjectDetached
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