pub trait SystemActorKeyValueEntryApi<E> {
// 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§
Sourcefn actor_open_key_value_entry(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
key: &Vec<u8>,
flags: LockFlags,
) -> Result<KeyValueEntryHandle, E>
fn actor_open_key_value_entry( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, key: &Vec<u8>, flags: LockFlags, ) -> Result<KeyValueEntryHandle, 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.
Sourcefn actor_remove_key_value_entry(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
key: &Vec<u8>,
) -> Result<Vec<u8>, E>
fn actor_remove_key_value_entry( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, 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§
Sourcefn actor_remove_key_value_entry_typed<V: ScryptoDecode>(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
key: &Vec<u8>,
) -> Result<Option<V>, E>
fn actor_remove_key_value_entry_typed<V: ScryptoDecode>( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, key: &Vec<u8>, ) -> Result<Option<V>, E>
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.