pub struct TransitionMemory<N: Network> { /* private fields */ }
Expand description
An in-memory transition storage.
Trait Implementations§
Source§impl<N: Clone + Network> Clone for TransitionMemory<N>where
N::TransitionID: Clone,
impl<N: Clone + Network> Clone for TransitionMemory<N>where
N::TransitionID: Clone,
Source§fn clone(&self) -> TransitionMemory<N>
fn clone(&self) -> TransitionMemory<N>
Returns a copy 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<N: Network> TransitionStorage<N> for TransitionMemory<N>
impl<N: Network> TransitionStorage<N> for TransitionMemory<N>
Source§fn open<S: Clone + Into<StorageMode>>(storage: S) -> Result<Self>
fn open<S: Clone + Into<StorageMode>>(storage: S) -> Result<Self>
Initializes the transition storage.
Source§fn locator_map(&self) -> &Self::LocatorMap
fn locator_map(&self) -> &Self::LocatorMap
Returns the transition program IDs and function names.
Source§fn input_store(&self) -> &InputStore<N, Self::InputStorage>
fn input_store(&self) -> &InputStore<N, Self::InputStorage>
Returns the transition input store.
Source§fn output_store(&self) -> &OutputStore<N, Self::OutputStorage>
fn output_store(&self) -> &OutputStore<N, Self::OutputStorage>
Returns the transition output store.
Source§fn reverse_tpk_map(&self) -> &Self::ReverseTPKMap
fn reverse_tpk_map(&self) -> &Self::ReverseTPKMap
Returns the reverse tpk
map.
Source§fn reverse_tcm_map(&self) -> &Self::ReverseTCMMap
fn reverse_tcm_map(&self) -> &Self::ReverseTCMMap
Returns the reverse tcm
map.
Source§type LocatorMap = MemoryMap<<N as Network>::TransitionID, (ProgramID<N>, Identifier<N>)>
type LocatorMap = MemoryMap<<N as Network>::TransitionID, (ProgramID<N>, Identifier<N>)>
The transition program IDs and function names.
Source§type InputStorage = InputMemory<N>
type InputStorage = InputMemory<N>
The transition inputs.
Source§type OutputStorage = OutputMemory<N>
type OutputStorage = OutputMemory<N>
The transition outputs.
Source§type ReverseTPKMap = MemoryMap<Group<N>, <N as Network>::TransitionID>
type ReverseTPKMap = MemoryMap<Group<N>, <N as Network>::TransitionID>
The mapping of
transition public key
to transition ID
.Source§type ReverseTCMMap = MemoryMap<Field<N>, <N as Network>::TransitionID>
type ReverseTCMMap = MemoryMap<Field<N>, <N as Network>::TransitionID>
The mapping of
transition commitment
to transition ID
.Source§fn storage_mode(&self) -> &StorageMode
fn storage_mode(&self) -> &StorageMode
Returns the storage mode.
Source§fn start_atomic(&self)
fn start_atomic(&self)
Starts an atomic batch write operation.
Source§fn is_atomic_in_progress(&self) -> bool
fn is_atomic_in_progress(&self) -> bool
Checks if an atomic batch is in progress.
Source§fn atomic_checkpoint(&self)
fn atomic_checkpoint(&self)
Checkpoints the atomic batch.
Source§fn clear_latest_checkpoint(&self)
fn clear_latest_checkpoint(&self)
Clears the latest atomic batch checkpoint.
Source§fn atomic_rewind(&self)
fn atomic_rewind(&self)
Rewinds the atomic batch to the previous checkpoint.
Source§fn abort_atomic(&self)
fn abort_atomic(&self)
Aborts an atomic batch write operation.
Source§fn finish_atomic(&self) -> Result<()>
fn finish_atomic(&self) -> Result<()>
Finishes an atomic batch write operation.
Source§fn insert(&self, transition: &Transition<N>) -> Result<()>
fn insert(&self, transition: &Transition<N>) -> Result<()>
Stores the given
transition
into storage.Source§fn remove(&self, transition_id: &N::TransitionID) -> Result<()>
fn remove(&self, transition_id: &N::TransitionID) -> Result<()>
Removes the input for the given
transition ID
.Source§fn get(&self, transition_id: &N::TransitionID) -> Result<Option<Transition<N>>>
fn get(&self, transition_id: &N::TransitionID) -> Result<Option<Transition<N>>>
Returns the transition for the given
transition ID
.Auto Trait Implementations§
impl<N> Freeze for TransitionMemory<N>
impl<N> !RefUnwindSafe for TransitionMemory<N>
impl<N> Send for TransitionMemory<N>
impl<N> Sync for TransitionMemory<N>
impl<N> Unpin for TransitionMemory<N>
impl<N> !UnwindSafe for TransitionMemory<N>
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> 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 more