soroban_sdk::testutils::storage

Trait 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.

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§