pub struct FlashSubstateDatabase { /* private fields */ }
Implementations§
Source§impl FlashSubstateDatabase
impl FlashSubstateDatabase
pub fn standard() -> Self
pub fn database_updates(self) -> DatabaseUpdates
Trait Implementations§
Source§impl Clone for FlashSubstateDatabase
impl Clone for FlashSubstateDatabase
Source§fn clone(&self) -> FlashSubstateDatabase
fn clone(&self) -> FlashSubstateDatabase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl CommittableSubstateDatabase for FlashSubstateDatabase
impl CommittableSubstateDatabase for FlashSubstateDatabase
Source§fn commit(&mut self, database_updates: &DatabaseUpdates)
fn commit(&mut self, database_updates: &DatabaseUpdates)
Commits state changes to the database.
Source§impl Debug for FlashSubstateDatabase
impl Debug for FlashSubstateDatabase
Source§impl PartialEq for FlashSubstateDatabase
impl PartialEq for FlashSubstateDatabase
Source§impl SubstateDatabase for FlashSubstateDatabase
impl SubstateDatabase for FlashSubstateDatabase
Source§fn get_raw_substate_by_db_key(
&self,
partition_key: &DbPartitionKey,
sort_key: &DbSortKey,
) -> Option<DbSubstateValue>
fn get_raw_substate_by_db_key( &self, partition_key: &DbPartitionKey, sort_key: &DbSortKey, ) -> Option<DbSubstateValue>
Reads a substate value by its db partition and db sort key, or
Option::None
if missing. Read moreSource§fn list_raw_values_from_db_key(
&self,
partition_key: &DbPartitionKey,
from_sort_key: Option<&DbSortKey>,
) -> Box<dyn Iterator<Item = PartitionEntry> + '_>
fn list_raw_values_from_db_key( &self, partition_key: &DbPartitionKey, from_sort_key: Option<&DbSortKey>, ) -> Box<dyn Iterator<Item = PartitionEntry> + '_>
impl Eq for FlashSubstateDatabase
impl StructuralPartialEq for FlashSubstateDatabase
Auto Trait Implementations§
impl Freeze for FlashSubstateDatabase
impl RefUnwindSafe for FlashSubstateDatabase
impl Send for FlashSubstateDatabase
impl Sync for FlashSubstateDatabase
impl Unpin for FlashSubstateDatabase
impl UnwindSafe for FlashSubstateDatabase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CommittableSubstateDatabaseExtensions for Twhere
T: CommittableSubstateDatabase + ?Sized,
impl<T> CommittableSubstateDatabaseExtensions for Twhere
T: CommittableSubstateDatabase + ?Sized,
fn update_substate_raw<'a>( &mut self, node_id: impl AsRef<NodeId>, partition_number: PartitionNumber, substate_key: impl ResolvableSubstateKey<'a>, value: Vec<u8>, )
fn delete_substate<'a>( &mut self, node_id: impl AsRef<NodeId>, partition_number: PartitionNumber, substate_key: impl ResolvableSubstateKey<'a>, )
fn update_substate<'a, E>(
&mut self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
substate_key: impl ResolvableSubstateKey<'a>,
value: E,
)where
E: ScryptoEncode,
Source§impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
type Error = <U as ContextualTryFrom<T>>::Error
type Context = <U as ContextualTryFrom<T>>::Context
fn contextual_try_into( self, context: &<U as ContextualTryFrom<T>>::Context, ) -> Result<U, <U as ContextualTryFrom<T>>::Error>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<X, Y> LabelledResolve<Y> for Xwhere
Y: LabelledResolveFrom<X>,
impl<X, Y> LabelledResolve<Y> for Xwhere
Y: LabelledResolveFrom<X>,
fn labelled_resolve( self, resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, ) -> Y
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SubstateDatabaseExtensions for Twhere
T: SubstateDatabase + ?Sized,
impl<T> SubstateDatabaseExtensions for Twhere
T: SubstateDatabase + ?Sized,
Source§fn get_raw_substate<'a>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
substate_key: impl ResolvableSubstateKey<'a>,
) -> Option<Vec<u8>>
fn get_raw_substate<'a>( &self, node_id: impl AsRef<NodeId>, partition_number: PartitionNumber, substate_key: impl ResolvableSubstateKey<'a>, ) -> Option<Vec<u8>>
Gets the raw bytes of the substate’s value, if it exists. Read more
Source§fn get_substate<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
substate_key: impl ResolvableSubstateKey<'a>,
) -> Option<V>where
V: ScryptoDecode,
fn get_substate<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
substate_key: impl ResolvableSubstateKey<'a>,
) -> Option<V>where
V: ScryptoDecode,
Gets the substate’s value, if it exists, and returns it decoded as
Some(V)
.
If it doesn’t exist, None
is returned. Read moreSource§fn get_existing_substate<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
substate_key: impl ResolvableSubstateKey<'a>,
) -> Vwhere
V: ScryptoDecode,
fn get_existing_substate<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
substate_key: impl ResolvableSubstateKey<'a>,
) -> Vwhere
V: ScryptoDecode,
Gets the value of a subsate which is expected to exist, returns it decoded as
V
. Read moreSource§fn list_raw_values<'a>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (DbSortKey, Vec<u8>)> + '_>
fn list_raw_values<'a>( &self, node_id: impl AsRef<NodeId>, partition_number: PartitionNumber, from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>, ) -> Box<dyn Iterator<Item = (DbSortKey, Vec<u8>)> + '_>
Returns an iterator of the substates of a partition from an inclusive start cursor. Read more
Source§fn list_kinded_raw_values<'a, K>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (K, Vec<u8>)> + '_>where
K: SubstateKeyContent,
fn list_kinded_raw_values<'a, K>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (K, Vec<u8>)> + '_>where
K: SubstateKeyContent,
Returns an iterator of the substates of a partition from an inclusive start cursor. Read more
Source§fn list_kinded_values<'a, K, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (K, V)> + '_>where
K: SubstateKeyContent,
V: ScryptoDecode,
fn list_kinded_values<'a, K, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (K, V)> + '_>where
K: SubstateKeyContent,
V: ScryptoDecode,
Returns an iterator of the substates of a partition from an inclusive start cursor. Read more
Source§fn list_field_raw_values<'a>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (u8, Vec<u8>)> + '_>
fn list_field_raw_values<'a>( &self, node_id: impl AsRef<NodeId>, partition_number: PartitionNumber, from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>, ) -> Box<dyn Iterator<Item = (u8, Vec<u8>)> + '_>
Returns an iterator of the substates of a field partition from an inclusive start cursor. Read more
Source§fn list_field_values<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (u8, V)> + '_>where
V: ScryptoDecode,
fn list_field_values<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (u8, V)> + '_>where
V: ScryptoDecode,
Returns an iterator of the substates of a field partition from an inclusive start cursor. Read more
Source§fn list_field_entries<'a, K, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (K, V)> + '_>
fn list_field_entries<'a, K, V>( &self, node_id: impl AsRef<NodeId>, partition_number: PartitionNumber, from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>, ) -> Box<dyn Iterator<Item = (K, V)> + '_>
Returns an iterator of the substates of a field partition from an inclusive start cursor. Read more
Source§fn list_map_raw_values<'a>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (Vec<u8>, Vec<u8>)> + '_>
fn list_map_raw_values<'a>( &self, node_id: impl AsRef<NodeId>, partition_number: PartitionNumber, from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>, ) -> Box<dyn Iterator<Item = (Vec<u8>, Vec<u8>)> + '_>
Returns an iterator of the substates of a map partition from an inclusive start cursor. Read more
Source§fn list_map_values<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (Vec<u8>, V)> + '_>where
V: ScryptoDecode,
fn list_map_values<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (Vec<u8>, V)> + '_>where
V: ScryptoDecode,
Returns an iterator of the substates of a map partition from an inclusive start cursor. Read more
Source§fn list_map_entries<'a, K, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (K, V)> + '_>where
K: ScryptoDecode,
V: ScryptoDecode,
fn list_map_entries<'a, K, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (K, V)> + '_>where
K: ScryptoDecode,
V: ScryptoDecode,
Returns an iterator of the substates of a map partition from an inclusive start cursor. Read more
Source§fn list_sorted_raw_values<'a>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (([u8; 2], Vec<u8>), Vec<u8>)> + '_>
fn list_sorted_raw_values<'a>( &self, node_id: impl AsRef<NodeId>, partition_number: PartitionNumber, from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>, ) -> Box<dyn Iterator<Item = (([u8; 2], Vec<u8>), Vec<u8>)> + '_>
Returns an iterator of the substates of a sorted partition from an inclusive start cursor. Read more
Source§fn list_sorted_values<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (([u8; 2], Vec<u8>), V)> + '_>where
V: ScryptoDecode,
fn list_sorted_values<'a, V>(
&self,
node_id: impl AsRef<NodeId>,
partition_number: PartitionNumber,
from_substate_key_inclusive: impl ResolvableOptionalSubstateKey<'a>,
) -> Box<dyn Iterator<Item = (([u8; 2], Vec<u8>), V)> + '_>where
V: ScryptoDecode,
Returns an iterator of the substates of a sorted partition from an inclusive start cursor. Read more