Trait scrypto::api::ClientActorIndexApi
source · pub trait ClientActorIndexApi<E> {
// Required methods
fn actor_index_insert(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>,
buffer: Vec<u8>
) -> Result<(), E>;
fn actor_index_remove(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>
) -> Result<Option<Vec<u8>>, E>;
fn actor_index_scan_keys(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32
) -> Result<Vec<Vec<u8>>, E>;
fn actor_index_drain(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32
) -> Result<Vec<(Vec<u8>, Vec<u8>)>, E>;
// Provided methods
fn actor_index_insert_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: K,
value: V
) -> Result<(), E>
where K: ScryptoEncode,
V: ScryptoEncode { ... }
fn actor_index_remove_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>
) -> Result<Option<V>, E>
where V: ScryptoDecode { ... }
fn actor_index_scan_keys_typed<K>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32
) -> Result<Vec<K>, E>
where K: ScryptoDecode { ... }
fn actor_index_drain_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32
) -> Result<Vec<(K, V)>, E>
where K: ScryptoDecode,
V: ScryptoDecode { ... }
}
Expand description
Api to manage an iterable index
Required Methods§
sourcefn actor_index_insert(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>,
buffer: Vec<u8>
) -> Result<(), E>
fn actor_index_insert( &mut self, object_handle: u32, collection_index: u8, key: Vec<u8>, buffer: Vec<u8> ) -> Result<(), E>
Inserts an entry into an index
sourcefn actor_index_remove(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>
) -> Result<Option<Vec<u8>>, E>
fn actor_index_remove( &mut self, object_handle: u32, collection_index: u8, key: Vec<u8> ) -> Result<Option<Vec<u8>>, E>
Removes an entry from an index
Provided Methods§
sourcefn actor_index_insert_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: K,
value: V
) -> Result<(), E>where
K: ScryptoEncode,
V: ScryptoEncode,
fn actor_index_insert_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: K,
value: V
) -> Result<(), E>where
K: ScryptoEncode,
V: ScryptoEncode,
Inserts an entry into an index
sourcefn actor_index_remove_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>
) -> Result<Option<V>, E>where
V: ScryptoDecode,
fn actor_index_remove_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>
) -> Result<Option<V>, E>where
V: ScryptoDecode,
Removes an entry from an index
sourcefn actor_index_scan_keys_typed<K>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32
) -> Result<Vec<K>, E>where
K: ScryptoDecode,
fn actor_index_scan_keys_typed<K>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32
) -> Result<Vec<K>, E>where
K: ScryptoDecode,
Scans arbitrary elements of count from an index
sourcefn actor_index_drain_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32
) -> Result<Vec<(K, V)>, E>where
K: ScryptoDecode,
V: ScryptoDecode,
fn actor_index_drain_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32
) -> Result<Vec<(K, V)>, E>where
K: ScryptoDecode,
V: ScryptoDecode,
Removes and returns arbitrary elements of count from an index
Object Safety§
This trait is not object safe.