Trait iota_types::storage::ChildObjectResolver

source ·
pub trait ChildObjectResolver {
    // Required methods
    fn read_child_object(
        &self,
        parent: &ObjectID,
        child: &ObjectID,
        child_version_upper_bound: SequenceNumber,
    ) -> IotaResult<Option<Object>>;
    fn get_object_received_at_version(
        &self,
        owner: &ObjectID,
        receiving_object_id: &ObjectID,
        receive_object_at_version: SequenceNumber,
        epoch_id: EpochId,
    ) -> IotaResult<Option<Object>>;
}
Expand description

An abstraction of the (possibly distributed) store for objects. This API only allows for the retrieval of objects, not any state changes

Required Methods§

source

fn read_child_object( &self, parent: &ObjectID, child: &ObjectID, child_version_upper_bound: SequenceNumber, ) -> IotaResult<Option<Object>>

child must have an ObjectOwner ownership equal to owner.

source

fn get_object_received_at_version( &self, owner: &ObjectID, receiving_object_id: &ObjectID, receive_object_at_version: SequenceNumber, epoch_id: EpochId, ) -> IotaResult<Option<Object>>

receiving_object_id must have an AddressOwner ownership equal to owner. get_object_received_at_version must be the exact version at which the object will be received, and it cannot have been previously received at that version. NB: An object not existing at that version, and not having valid access to the object will be treated exactly the same and Ok(None) must be returned.

Implementations on Foreign Types§

source§

impl<S: ChildObjectResolver> ChildObjectResolver for &S

source§

fn read_child_object( &self, parent: &ObjectID, child: &ObjectID, child_version_upper_bound: SequenceNumber, ) -> IotaResult<Option<Object>>

source§

fn get_object_received_at_version( &self, owner: &ObjectID, receiving_object_id: &ObjectID, receive_object_at_version: SequenceNumber, epoch_id: EpochId, ) -> IotaResult<Option<Object>>

source§

impl<S: ChildObjectResolver> ChildObjectResolver for &mut S

source§

fn read_child_object( &self, parent: &ObjectID, child: &ObjectID, child_version_upper_bound: SequenceNumber, ) -> IotaResult<Option<Object>>

source§

fn get_object_received_at_version( &self, owner: &ObjectID, receiving_object_id: &ObjectID, receive_object_at_version: SequenceNumber, epoch_id: EpochId, ) -> IotaResult<Option<Object>>

source§

impl<S: ChildObjectResolver> ChildObjectResolver for Arc<S>

source§

fn read_child_object( &self, parent: &ObjectID, child: &ObjectID, child_version_upper_bound: SequenceNumber, ) -> IotaResult<Option<Object>>

source§

fn get_object_received_at_version( &self, owner: &ObjectID, receiving_object_id: &ObjectID, receive_object_at_version: SequenceNumber, epoch_id: EpochId, ) -> IotaResult<Option<Object>>

Implementors§