pub trait ClientActorKeyValueEntryApi<E: Debug> {
    // Required methods
    fn actor_open_key_value_entry(
        &mut self,
        object_handle: ActorStateHandle,
        collection_index: CollectionIndex,
        key: &Vec<u8>,
        flags: LockFlags
    ) -> Result<KeyValueEntryHandle, E>;
    fn actor_remove_key_value_entry(
        &mut self,
        object_handle: ActorStateHandle,
        collection_index: CollectionIndex,
        key: &Vec<u8>
    ) -> Result<Vec<u8>, E>;

    // Provided method
    fn actor_remove_key_value_entry_typed<V: ScryptoDecode>(
        &mut self,
        object_handle: ActorStateHandle,
        collection_index: CollectionIndex,
        key: &Vec<u8>
    ) -> Result<Option<V>, E> { ... }
}

Required Methods§

source

fn actor_open_key_value_entry( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, key: &Vec<u8>, flags: LockFlags ) -> Result<KeyValueEntryHandle, E>

If the key value entry doesn’t exist, it uses the default “Option::None”

source

fn actor_remove_key_value_entry( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, key: &Vec<u8> ) -> Result<Vec<u8>, E>

Provided Methods§

source

fn actor_remove_key_value_entry_typed<V: ScryptoDecode>( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, key: &Vec<u8> ) -> Result<Option<V>, E>

Object Safety§

This trait is not object safe.

Implementors§