pub type Error = Box<dyn Error + Send + Sync + 'static>;
Expand description
The error returned by methods of the Find trait.
Aliased Type§
struct Error(/* private fields */);
Trait Implementations§
source§impl<T: DecodeEntry + ?Sized> DecodeEntry for Box<T>
impl<T: DecodeEntry + ?Sized> DecodeEntry for Box<T>
source§impl<T> Find for Box<T>where
T: Find,
impl<T> Find for Box<T>where T: Find,
source§fn try_find_cached<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
pack_cache: &mut dyn DecodeEntry
) -> Result<Option<(Data<'a>, Option<Location>)>, Error>
fn try_find_cached<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, pack_cache: &mut dyn DecodeEntry ) -> Result<Option<(Data<'a>, Option<Location>)>, Error>
Like
Find::try_find()
, but with support for controlling the pack cache.
A pack_cache
can be used to speed up subsequent lookups, set it to crate::cache::Never
if the
workload isn’t suitable for caching. Read moresource§fn location_by_oid(&self, id: &oid, buf: &mut Vec<u8>) -> Option<Location>
fn location_by_oid(&self, id: &oid, buf: &mut Vec<u8>) -> Option<Location>
Find the packs location where an object with
id
can be found in the database, or None
if there is no pack
holding the object. Read moresource§fn pack_offsets_and_oid(&self, pack_id: u32) -> Option<Vec<(Offset, ObjectId)>>
fn pack_offsets_and_oid(&self, pack_id: u32) -> Option<Vec<(Offset, ObjectId)>>
Obtain a vector of all offsets, in index order, along with their object id.
source§fn try_find<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>
) -> Result<Option<(Data<'a>, Option<Location>)>, Error>
fn try_find<'a>( &self, id: &oid, buffer: &'a mut Vec<u8> ) -> Result<Option<(Data<'a>, Option<Location>)>, Error>
Find an object matching
id
in the database while placing its raw, decoded data into buffer
.
A pack_cache
can be used to speed up subsequent lookups, set it to crate::cache::Never
if the
workload isn’t suitable for caching. Read more