pub struct TransitionMemory<N>where
N: Network,{ /* private fields */ }Expand description
An in-memory transition storage.
Trait Implementations§
Source§impl<N> Clone for TransitionMemory<N>
impl<N> Clone for TransitionMemory<N>
Source§fn clone(&self) -> TransitionMemory<N>
fn clone(&self) -> TransitionMemory<N>
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<N> TransitionStorage<N> for TransitionMemory<N>where
N: Network,
impl<N> TransitionStorage<N> for TransitionMemory<N>where
N: Network,
Source§fn open(dev: Option<u16>) -> Result<TransitionMemory<N>, Error>
fn open(dev: Option<u16>) -> Result<TransitionMemory<N>, Error>
Initializes the transition storage.
Source§fn locator_map(
&self,
) -> &<TransitionMemory<N> as TransitionStorage<N>>::LocatorMap
fn locator_map( &self, ) -> &<TransitionMemory<N> as TransitionStorage<N>>::LocatorMap
Returns the transition program IDs and function names.
Source§fn input_store(
&self,
) -> &InputStore<N, <TransitionMemory<N> as TransitionStorage<N>>::InputStorage>
fn input_store( &self, ) -> &InputStore<N, <TransitionMemory<N> as TransitionStorage<N>>::InputStorage>
Returns the transition input store.
Source§fn output_store(
&self,
) -> &OutputStore<N, <TransitionMemory<N> as TransitionStorage<N>>::OutputStorage>
fn output_store( &self, ) -> &OutputStore<N, <TransitionMemory<N> as TransitionStorage<N>>::OutputStorage>
Returns the transition output store.
Source§fn tpk_map(&self) -> &<TransitionMemory<N> as TransitionStorage<N>>::TPKMap
fn tpk_map(&self) -> &<TransitionMemory<N> as TransitionStorage<N>>::TPKMap
Returns the transition public keys.
Source§fn reverse_tpk_map(
&self,
) -> &<TransitionMemory<N> as TransitionStorage<N>>::ReverseTPKMap
fn reverse_tpk_map( &self, ) -> &<TransitionMemory<N> as TransitionStorage<N>>::ReverseTPKMap
Returns the reverse tpk map.
Source§fn tcm_map(&self) -> &<TransitionMemory<N> as TransitionStorage<N>>::TCMMap
fn tcm_map(&self) -> &<TransitionMemory<N> as TransitionStorage<N>>::TCMMap
Returns the transition commitments.
Source§fn reverse_tcm_map(
&self,
) -> &<TransitionMemory<N> as TransitionStorage<N>>::ReverseTCMMap
fn reverse_tcm_map( &self, ) -> &<TransitionMemory<N> as TransitionStorage<N>>::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 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 insert(&self, transition: &Transition<N>) -> Result<(), Error>
fn insert(&self, transition: &Transition<N>) -> Result<(), Error>
Stores the given
transition into storage.Source§fn remove(
&self,
transition_id: &<N as Network>::TransitionID,
) -> Result<(), Error>
fn remove( &self, transition_id: &<N as Network>::TransitionID, ) -> Result<(), Error>
Removes the input for the given
transition ID.Source§fn get(
&self,
transition_id: &<N as Network>::TransitionID,
) -> Result<Option<Transition<N>>, Error>
fn get( &self, transition_id: &<N as Network>::TransitionID, ) -> Result<Option<Transition<N>>, Error>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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