Trait SystemActorKeyValueEntryApi

Source
pub trait SystemActorKeyValueEntryApi<E> {
    // Required methods
    fn actor_open_key_value_entry(
        &mut self,
        object_handle: u32,
        collection_index: u8,
        key: &Vec<u8>,
        flags: LockFlags,
    ) -> Result<u32, E>;
    fn actor_remove_key_value_entry(
        &mut self,
        object_handle: u32,
        collection_index: u8,
        key: &Vec<u8>,
    ) -> Result<Vec<u8>, E>;

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

Required Methods§

Source

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

Returns a handle for a specified key value entry in a collection. If an invalid collection index or key is passed an error is returned.

Source

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

Removes an entry from a collection. If an invalid collection index or key is passed an error is returned, otherwise the encoding of a value of the entry is returned.

Provided Methods§

Source

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

Removes an entry from a collection. If an invalid collection index or key is passed an error is returned, otherwise the value of the entry is returned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§