Trait soroban_sdk::testutils::storage::Temporary

source ·
pub trait Temporary {
    // Required methods
    fn all(&self) -> Map<Val, Val>;
    fn get_ttl<K: IntoVal<Env, Val>>(&self, key: &K) -> u32;
}
Available on crate feature testutils only.
Expand description

Test utilities for Temporary.

Required Methods§

source

fn all(&self) -> Map<Val, Val>

Returns all data stored in temporary storage for the contract.

source

fn get_ttl<K: IntoVal<Env, Val>>(&self, key: &K) -> u32

Gets the TTL for the temporary storage entry corresponding to the provided key.

TTL is the number of ledgers left until the temporary entry is considered non-existent, excluding the current ledger.

Panics if there is no entry corresponding to the key.

Object Safety§

This trait is not object safe.

Implementors§