pub struct Never;Expand description
An implementation of object access traits that stores nothing and finds nothing.
Trait Implementations§
impl Copy for Never
Source§impl Write for Never
impl Write for Never
Source§fn write_buf(&self, object: Kind, from: &[u8]) -> Result<ObjectId, Error>
fn write_buf(&self, object: Kind, from: &[u8]) -> Result<ObjectId, Error>
As
write, but takes an object kind along with its encoded bytes.Source§fn write_buf_with_known_id(
&self,
_object: Kind,
_from: &[u8],
id: ObjectId,
) -> Result<ObjectId, Error>
fn write_buf_with_known_id( &self, _object: Kind, _from: &[u8], id: ObjectId, ) -> Result<ObjectId, Error>
Source§fn write_stream(
&self,
kind: Kind,
size: u64,
from: &mut dyn Read,
) -> Result<ObjectId, Error>
fn write_stream( &self, kind: Kind, size: u64, from: &mut dyn Read, ) -> Result<ObjectId, Error>
As
write, but takes an input stream.
This is commonly used for writing blobs directly without reading them to memory first.Auto Trait Implementations§
impl Freeze for Never
impl RefUnwindSafe for Never
impl Send for Never
impl Sync for Never
impl Unpin for Never
impl UnsafeUnpin for Never
impl UnwindSafe for Never
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§impl<T> FindExt for T
impl<T> FindExt for T
Source§fn find<'a>(&self, id: &oid, buffer: &'a mut Vec<u8>) -> Result<Data<'a>, Error>
fn find<'a>(&self, id: &oid, buffer: &'a mut Vec<u8>) -> Result<Data<'a>, Error>
Like
try_find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error.Source§fn find_blob<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<BlobRef<'a>, Error>
fn find_blob<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<BlobRef<'a>, Error>
Like
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired object type.Source§fn find_tree<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<TreeRef<'a>, Error>
fn find_tree<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TreeRef<'a>, Error>
Like
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired object type.Source§fn find_commit<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<CommitRef<'a>, Error>
fn find_commit<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<CommitRef<'a>, Error>
Like
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired object type.Source§fn find_tag<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<TagRef<'a>, Error>
fn find_tag<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TagRef<'a>, Error>
Like
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired object type.Source§fn find_commit_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<CommitRefIter<'a>, Error>
fn find_commit_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<CommitRefIter<'a>, Error>
Like
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired iterator type.Source§fn find_tree_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<TreeRefIter<'a>, Error>
fn find_tree_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TreeRefIter<'a>, Error>
Like
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired iterator type.Source§fn find_tag_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<TagRefIter<'a>, Error>
fn find_tag_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TagRefIter<'a>, Error>
Like
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired iterator type.