pub trait ClientActorSortedIndexApi<E> {
// Required methods
fn actor_sorted_index_insert(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: SortedKey,
buffer: Vec<u8>
) -> Result<(), E>;
fn actor_sorted_index_remove(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: &SortedKey
) -> Result<Option<Vec<u8>>, E>;
fn actor_sorted_index_scan(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
count: u32
) -> Result<Vec<(SortedKey, Vec<u8>)>, E>;
// Provided methods
fn actor_sorted_index_insert_typed<V: ScryptoEncode>(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: SortedKey,
value: V
) -> Result<(), E> { ... }
fn actor_sorted_index_remove_typed<V: ScryptoDecode>(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: &SortedKey
) -> Result<Option<V>, E> { ... }
fn actor_sorted_index_scan_typed<K: ScryptoDecode, V: ScryptoDecode>(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
count: u32
) -> Result<Vec<(K, V)>, E> { ... }
}
Required Methods§
sourcefn actor_sorted_index_insert(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: SortedKey,
buffer: Vec<u8>
) -> Result<(), E>
fn actor_sorted_index_insert( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, sorted_key: SortedKey, buffer: Vec<u8> ) -> Result<(), E>
Inserts an entry into a sorted index
sourcefn actor_sorted_index_remove(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: &SortedKey
) -> Result<Option<Vec<u8>>, E>
fn actor_sorted_index_remove( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, sorted_key: &SortedKey ) -> Result<Option<Vec<u8>>, E>
Removes an entry from a sorted index
sourcefn actor_sorted_index_scan(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
count: u32
) -> Result<Vec<(SortedKey, Vec<u8>)>, E>
fn actor_sorted_index_scan( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, count: u32 ) -> Result<Vec<(SortedKey, Vec<u8>)>, E>
Scans the first elements of count from a sorted index
Provided Methods§
sourcefn actor_sorted_index_insert_typed<V: ScryptoEncode>(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: SortedKey,
value: V
) -> Result<(), E>
fn actor_sorted_index_insert_typed<V: ScryptoEncode>( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, sorted_key: SortedKey, value: V ) -> Result<(), E>
Inserts an entry into a sorted index
sourcefn actor_sorted_index_remove_typed<V: ScryptoDecode>(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: &SortedKey
) -> Result<Option<V>, E>
fn actor_sorted_index_remove_typed<V: ScryptoDecode>( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, sorted_key: &SortedKey ) -> Result<Option<V>, E>
Removes an entry from a sorted index
sourcefn actor_sorted_index_scan_typed<K: ScryptoDecode, V: ScryptoDecode>(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
count: u32
) -> Result<Vec<(K, V)>, E>
fn actor_sorted_index_scan_typed<K: ScryptoDecode, V: ScryptoDecode>( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, count: u32 ) -> Result<Vec<(K, V)>, E>
Scans the first elements of count from a sorted index
Object Safety§
This trait is not object safe.