pub struct Never;Expand description
An implementation of object access traits that stores nothing and finds nothing.
Use Never::panic_on_access() to panic on object access instead.
Implementations§
Source§impl Never
impl Never
Sourcepub const fn panic_on_access() -> PanicAlways
pub const fn panic_on_access() -> PanicAlways
Return an implementation that panics whenever an object access trait method is called. Useful for asserting that an operation does not access the object database.
Trait Implementations§
impl Copy for Never
Source§impl Write for Never
impl Write for Never
Source§fn write_buf(&self, object: Kind, from: &[u8]) -> ExnResult<ObjectId>
fn write_buf(&self, object: Kind, from: &[u8]) -> ExnResult<ObjectId>
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,
) -> ExnResult<ObjectId>
fn write_buf_with_known_id( &self, _object: Kind, _from: &[u8], id: ObjectId, ) -> ExnResult<ObjectId>
Source§fn write_stream(
&self,
kind: Kind,
size: u64,
from: &mut dyn Read,
) -> ExnResult<ObjectId>
fn write_stream( &self, kind: Kind, size: u64, from: &mut dyn Read, ) -> ExnResult<ObjectId>
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>) -> ExnResult<Data<'a>>
fn find<'a>(&self, id: &oid, buffer: &'a mut Vec<u8>) -> ExnResult<Data<'a>>
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>,
) -> ExnResult<BlobRef<'a>>
fn find_blob<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> ExnResult<BlobRef<'a>>
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>,
) -> ExnResult<TreeRef<'a>>
fn find_tree<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> ExnResult<TreeRef<'a>>
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>,
) -> ExnResult<CommitRef<'a>>
fn find_commit<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> ExnResult<CommitRef<'a>>
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>,
) -> ExnResult<TagRef<'a>>
fn find_tag<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> ExnResult<TagRef<'a>>
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>,
) -> ExnResult<CommitRefIter<'a>>
fn find_commit_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> ExnResult<CommitRefIter<'a>>
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>,
) -> ExnResult<TreeRefIter<'a>>
fn find_tree_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> ExnResult<TreeRefIter<'a>>
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>,
) -> ExnResult<TagRefIter<'a>>
fn find_tag_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> ExnResult<TagRefIter<'a>>
Like
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired iterator type.