pub trait ObjectStore {
// Required methods
fn try_get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>;
fn try_get_object_by_key(
&self,
object_id: &ObjectID,
version: VersionNumber,
) -> Result<Option<Object>>;
// Provided methods
fn get_object(&self, object_id: &ObjectID) -> Option<Object> { ... }
fn get_object_by_key(
&self,
object_id: &ObjectID,
version: VersionNumber,
) -> Option<Object> { ... }
fn try_multi_get_objects(
&self,
object_ids: &[ObjectID],
) -> Result<Vec<Option<Object>>> { ... }
fn multi_get_objects(&self, object_ids: &[ObjectID]) -> Vec<Option<Object>> { ... }
fn try_multi_get_objects_by_key(
&self,
object_keys: &[ObjectKey],
) -> Result<Vec<Option<Object>>> { ... }
fn multi_get_objects_by_key(
&self,
object_keys: &[ObjectKey],
) -> Vec<Option<Object>> { ... }
}
Required Methods§
fn try_get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>
fn try_get_object_by_key( &self, object_id: &ObjectID, version: VersionNumber, ) -> Result<Option<Object>>
Provided Methods§
Sourcefn get_object(&self, object_id: &ObjectID) -> Option<Object>
fn get_object(&self, object_id: &ObjectID) -> Option<Object>
Non-fallible version of try_get_object
.
Sourcefn get_object_by_key(
&self,
object_id: &ObjectID,
version: VersionNumber,
) -> Option<Object>
fn get_object_by_key( &self, object_id: &ObjectID, version: VersionNumber, ) -> Option<Object>
Non-fallible version of try_get_object_by_key
.
fn try_multi_get_objects( &self, object_ids: &[ObjectID], ) -> Result<Vec<Option<Object>>>
Sourcefn multi_get_objects(&self, object_ids: &[ObjectID]) -> Vec<Option<Object>>
fn multi_get_objects(&self, object_ids: &[ObjectID]) -> Vec<Option<Object>>
Non-fallible version of try_multi_get_objects
.