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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)