Trait iota_types::storage::ObjectStore

source ·
pub trait ObjectStore {
    // Required methods
    fn get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>;
    fn get_object_by_key(
        &self,
        object_id: &ObjectID,
        version: VersionNumber,
    ) -> Result<Option<Object>>;

    // Provided methods
    fn multi_get_objects(
        &self,
        object_ids: &[ObjectID],
    ) -> Result<Vec<Option<Object>>> { ... }
    fn multi_get_objects_by_key(
        &self,
        object_keys: &[ObjectKey],
    ) -> Result<Vec<Option<Object>>> { ... }
}

Required Methods§

source

fn get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>

source

fn get_object_by_key( &self, object_id: &ObjectID, version: VersionNumber, ) -> Result<Option<Object>>

Provided Methods§

source

fn multi_get_objects( &self, object_ids: &[ObjectID], ) -> Result<Vec<Option<Object>>>

source

fn multi_get_objects_by_key( &self, object_keys: &[ObjectKey], ) -> Result<Vec<Option<Object>>>

Implementations on Foreign Types§

source§

impl ObjectStore for &[Object]

source§

fn get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>

source§

fn get_object_by_key( &self, object_id: &ObjectID, version: VersionNumber, ) -> Result<Option<Object>>

source§

impl ObjectStore for BTreeMap<ObjectID, (ObjectRef, Object, WriteKind)>

source§

fn get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>

source§

fn get_object_by_key( &self, object_id: &ObjectID, version: VersionNumber, ) -> Result<Option<Object>>

source§

impl ObjectStore for BTreeMap<ObjectID, Object>

source§

fn get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>

source§

fn get_object_by_key( &self, object_id: &ObjectID, version: VersionNumber, ) -> Result<Option<Object>>

source§

impl<T: ObjectStore + ?Sized> ObjectStore for &T

source§

fn get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>

source§

fn get_object_by_key( &self, object_id: &ObjectID, version: VersionNumber, ) -> Result<Option<Object>>

source§

fn multi_get_objects( &self, object_ids: &[ObjectID], ) -> Result<Vec<Option<Object>>>

source§

fn multi_get_objects_by_key( &self, object_keys: &[ObjectKey], ) -> Result<Vec<Option<Object>>>

source§

impl<T: ObjectStore + ?Sized> ObjectStore for Box<T>

source§

fn get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>

source§

fn get_object_by_key( &self, object_id: &ObjectID, version: VersionNumber, ) -> Result<Option<Object>>

source§

fn multi_get_objects( &self, object_ids: &[ObjectID], ) -> Result<Vec<Option<Object>>>

source§

fn multi_get_objects_by_key( &self, object_keys: &[ObjectKey], ) -> Result<Vec<Option<Object>>>

source§

impl<T: ObjectStore + ?Sized> ObjectStore for Arc<T>

source§

fn get_object(&self, object_id: &ObjectID) -> Result<Option<Object>>

source§

fn get_object_by_key( &self, object_id: &ObjectID, version: VersionNumber, ) -> Result<Option<Object>>

source§

fn multi_get_objects( &self, object_ids: &[ObjectID], ) -> Result<Vec<Option<Object>>>

source§

fn multi_get_objects_by_key( &self, object_keys: &[ObjectKey], ) -> Result<Vec<Option<Object>>>

Implementors§