pub struct PanicAlways;Available on crate feature
blob only.Expand description
An implementation of object access traits that panics on every call.
Obtain it with Never::panic_on_access().
Trait Implementations§
Source§impl Clone for PanicAlways
impl Clone for PanicAlways
Source§fn clone(&self) -> PanicAlways
fn clone(&self) -> PanicAlways
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PanicAlways
Source§impl Debug for PanicAlways
impl Debug for PanicAlways
Source§impl Exists for PanicAlways
impl Exists for PanicAlways
Source§impl Find for PanicAlways
impl Find for PanicAlways
Source§impl Header for PanicAlways
impl Header for PanicAlways
Source§impl Write for PanicAlways
impl Write for PanicAlways
Source§fn write(&self, _object: &dyn WriteTo) -> Result<ObjectId, Error>
fn write(&self, _object: &dyn WriteTo) -> Result<ObjectId, Error>
Write objects using the intrinsic kind of
hash into the database,
returning id to reference it in subsequent reads.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 Forget for PanicAlways
impl Freeze for PanicAlways
impl Move for PanicAlways
impl RefUnwindSafe for PanicAlways
impl Send for PanicAlways
impl Sync for PanicAlways
impl Unpin for PanicAlways
impl UnsafeUnpin for PanicAlways
impl UnwindSafe for PanicAlways
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.