pub struct DeploymentMemory<N>where
N: Network,{ /* private fields */ }Expand description
An in-memory deployment storage.
Trait Implementations§
Source§impl<N> Clone for DeploymentMemory<N>
impl<N> Clone for DeploymentMemory<N>
Source§fn clone(&self) -> DeploymentMemory<N>
fn clone(&self) -> DeploymentMemory<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> DeploymentStorage<N> for DeploymentMemory<N>where
N: Network,
impl<N> DeploymentStorage<N> for DeploymentMemory<N>where
N: Network,
Source§fn open(
fee_store: FeeStore<N, <DeploymentMemory<N> as DeploymentStorage<N>>::FeeStorage>,
) -> Result<DeploymentMemory<N>, Error>
fn open( fee_store: FeeStore<N, <DeploymentMemory<N> as DeploymentStorage<N>>::FeeStorage>, ) -> Result<DeploymentMemory<N>, Error>
Initializes the deployment storage.
Source§fn id_map(&self) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::IDMap
fn id_map(&self) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::IDMap
Returns the ID map.
Source§fn edition_map(
&self,
) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::EditionMap
fn edition_map( &self, ) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::EditionMap
Returns the edition map.
Source§fn reverse_id_map(
&self,
) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::ReverseIDMap
fn reverse_id_map( &self, ) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::ReverseIDMap
Returns the reverse ID map.
Source§fn owner_map(&self) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::OwnerMap
fn owner_map(&self) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::OwnerMap
Returns the owner map.
Source§fn program_map(
&self,
) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::ProgramMap
fn program_map( &self, ) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::ProgramMap
Returns the program map.
Source§fn verifying_key_map(
&self,
) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::VerifyingKeyMap
fn verifying_key_map( &self, ) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::VerifyingKeyMap
Returns the verifying key map.
Source§fn certificate_map(
&self,
) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::CertificateMap
fn certificate_map( &self, ) -> &<DeploymentMemory<N> as DeploymentStorage<N>>::CertificateMap
Returns the certificate map.
Source§fn fee_store(
&self,
) -> &FeeStore<N, <DeploymentMemory<N> as DeploymentStorage<N>>::FeeStorage>
fn fee_store( &self, ) -> &FeeStore<N, <DeploymentMemory<N> as DeploymentStorage<N>>::FeeStorage>
Returns the fee store.
Source§type IDMap = MemoryMap<<N as Network>::TransactionID, ProgramID<N>>
type IDMap = MemoryMap<<N as Network>::TransactionID, ProgramID<N>>
The mapping of
transaction ID to program ID.Source§type ReverseIDMap = MemoryMap<(ProgramID<N>, u16), <N as Network>::TransactionID>
type ReverseIDMap = MemoryMap<(ProgramID<N>, u16), <N as Network>::TransactionID>
The mapping of
(program ID, edition) to transaction ID.Source§type OwnerMap = MemoryMap<(ProgramID<N>, u16), ProgramOwner<N>>
type OwnerMap = MemoryMap<(ProgramID<N>, u16), ProgramOwner<N>>
The mapping of
(program ID, edition) to ProgramOwner.Source§type ProgramMap = MemoryMap<(ProgramID<N>, u16), ProgramCore<N, Instruction<N>, Command<N>>>
type ProgramMap = MemoryMap<(ProgramID<N>, u16), ProgramCore<N, Instruction<N>, Command<N>>>
The mapping of
(program ID, edition) to program.Source§type VerifyingKeyMap = MemoryMap<(ProgramID<N>, Identifier<N>, u16), VerifyingKey<N>>
type VerifyingKeyMap = MemoryMap<(ProgramID<N>, Identifier<N>, u16), VerifyingKey<N>>
The mapping of
(program ID, function name, edition) to verifying key.Source§type CertificateMap = MemoryMap<(ProgramID<N>, Identifier<N>, u16), Certificate<N>>
type CertificateMap = MemoryMap<(ProgramID<N>, Identifier<N>, u16), Certificate<N>>
The mapping of
(program ID, function name, edition) to certificate.Source§type FeeStorage = FeeMemory<N>
type FeeStorage = FeeMemory<N>
The fee storage.
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, transaction: &Transaction<N>) -> Result<(), Error>
fn insert(&self, transaction: &Transaction<N>) -> Result<(), Error>
Stores the given
deployment transaction pair into storage.Source§fn remove(
&self,
transaction_id: &<N as Network>::TransactionID,
) -> Result<(), Error>
fn remove( &self, transaction_id: &<N as Network>::TransactionID, ) -> Result<(), Error>
Removes the deployment transaction for the given
transaction ID.Source§fn find_transaction_id_from_program_id(
&self,
program_id: &ProgramID<N>,
) -> Result<Option<<N as Network>::TransactionID>, Error>
fn find_transaction_id_from_program_id( &self, program_id: &ProgramID<N>, ) -> Result<Option<<N as Network>::TransactionID>, Error>
Returns the transaction ID that contains the given
program ID.Source§fn find_transaction_id_from_transition_id(
&self,
transition_id: &<N as Network>::TransitionID,
) -> Result<Option<<N as Network>::TransactionID>, Error>
fn find_transaction_id_from_transition_id( &self, transition_id: &<N as Network>::TransitionID, ) -> Result<Option<<N as Network>::TransactionID>, Error>
Returns the transaction ID that contains the given
transition ID.Source§fn get_program_id(
&self,
transaction_id: &<N as Network>::TransactionID,
) -> Result<Option<ProgramID<N>>, Error>
fn get_program_id( &self, transaction_id: &<N as Network>::TransactionID, ) -> Result<Option<ProgramID<N>>, Error>
Returns the program ID for the given
transaction ID.Source§fn get_edition(&self, program_id: &ProgramID<N>) -> Result<Option<u16>, Error>
fn get_edition(&self, program_id: &ProgramID<N>) -> Result<Option<u16>, Error>
Returns the edition for the given
program ID.Source§fn get_program(
&self,
program_id: &ProgramID<N>,
) -> Result<Option<ProgramCore<N, Instruction<N>, Command<N>>>, Error>
fn get_program( &self, program_id: &ProgramID<N>, ) -> Result<Option<ProgramCore<N, Instruction<N>, Command<N>>>, Error>
Returns the program for the given
program ID.Source§fn get_verifying_key(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>,
) -> Result<Option<VerifyingKey<N>>, Error>
fn get_verifying_key( &self, program_id: &ProgramID<N>, function_name: &Identifier<N>, ) -> Result<Option<VerifyingKey<N>>, Error>
Returns the verifying key for the given
program ID and function name.Source§fn get_certificate(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>,
) -> Result<Option<Certificate<N>>, Error>
fn get_certificate( &self, program_id: &ProgramID<N>, function_name: &Identifier<N>, ) -> Result<Option<Certificate<N>>, Error>
Returns the certificate for the given
program ID and function name.Source§fn get_deployment(
&self,
transaction_id: &<N as Network>::TransactionID,
) -> Result<Option<Deployment<N>>, Error>
fn get_deployment( &self, transaction_id: &<N as Network>::TransactionID, ) -> Result<Option<Deployment<N>>, Error>
Returns the deployment for the given
transaction ID.Source§fn get_fee(
&self,
transaction_id: &<N as Network>::TransactionID,
) -> Result<Option<Fee<N>>, Error>
fn get_fee( &self, transaction_id: &<N as Network>::TransactionID, ) -> Result<Option<Fee<N>>, Error>
Returns the fee for the given
transaction ID.Source§fn get_owner(
&self,
program_id: &ProgramID<N>,
) -> Result<Option<ProgramOwner<N>>, Error>
fn get_owner( &self, program_id: &ProgramID<N>, ) -> Result<Option<ProgramOwner<N>>, Error>
Returns the owner for the given
program ID.Source§fn get_transaction(
&self,
transaction_id: &<N as Network>::TransactionID,
) -> Result<Option<Transaction<N>>, Error>
fn get_transaction( &self, transaction_id: &<N as Network>::TransactionID, ) -> Result<Option<Transaction<N>>, Error>
Returns the transaction for the given
transaction ID.Auto Trait Implementations§
impl<N> Freeze for DeploymentMemory<N>
impl<N> !RefUnwindSafe for DeploymentMemory<N>
impl<N> Send for DeploymentMemory<N>
impl<N> Sync for DeploymentMemory<N>
impl<N> Unpin for DeploymentMemory<N>where
N: Unpin,
impl<N> !UnwindSafe for DeploymentMemory<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