pub trait Persistent {
// 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 Persistent
.
Required Methods§
Sourcefn get_ttl<K: IntoVal<Env, Val>>(&self, key: &K) -> u32
fn get_ttl<K: IntoVal<Env, Val>>(&self, key: &K) -> u32
Gets the TTL for the persistent storage entry corresponding to the provided key.
TTL is the number of ledgers left until the persistent entry is considered expired, excluding the current ledger.
Panics if there is no entry corresponding to the key, or if the entry has expired.
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.