pub struct Blob<'repo> {
pub id: ObjectId,
pub data: Vec<u8>,
/* private fields */
}
Expand description
A blob along with access to its owning repository.
Fields§
§id: ObjectId
The id of the tree
data: Vec<u8>
The blob’s data.
Implementations§
Source§impl Blob<'_>
impl Blob<'_>
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<Blob<'repo>> for ObjectDetached
impl<'repo> From<Blob<'repo>> for ObjectDetached
Auto Trait Implementations§
impl<'repo> Freeze for Blob<'repo>
impl<'repo> !RefUnwindSafe for Blob<'repo>
impl<'repo> !Send for Blob<'repo>
impl<'repo> !Sync for Blob<'repo>
impl<'repo> Unpin for Blob<'repo>
impl<'repo> !UnwindSafe for Blob<'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