pub struct Tag<'repo> {
pub id: ObjectId,
pub data: Vec<u8>,
/* private fields */
}
Expand description
A decoded tag object with access to its owning repository.
Fields§
§id: ObjectId
The id of the tree
data: Vec<u8>
The fully decoded tag data
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<'_>
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> !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