pub trait Find {
    type Error: 'static + Error;
    fn contains(&self, id: impl AsRef<oid>) -> bool;
fn try_find(
        &self,
        id: impl AsRef<oid>,
        buffer: &'a mut Vec<u8, Global>
    ) -> Result<Option<Data<'a>>, Self::Error>; }
Expand description

Describe how object can be located in an object store.

Notes

Find effectively needs generic associated types to allow a trait for the returned object type. Until then, we will have to make due with explicit types and give them the potentially added features we want.

Associated Types

The error returned by try_find()

Required methods

Returns true if the object exists in the database.

Find an object matching id in the database while placing its raw, undecoded data into buffer.

Returns Some object if it was present in the database, or the error that occurred during lookup or object retrieval.

Implementations on Foreign Types

Implementors