Struct snarkvm_compiler::DeploymentMemory
source · [−]pub struct DeploymentMemory<N: Network> { /* private fields */ }
Expand description
An in-memory deployment storage.
Trait Implementations
sourceimpl<N: Clone + Network> Clone for DeploymentMemory<N> where
N::TransactionID: Clone,
N::TransactionID: Clone,
N::TransactionID: Clone,
N::TransitionID: Clone,
impl<N: Clone + Network> Clone for DeploymentMemory<N> where
N::TransactionID: Clone,
N::TransactionID: Clone,
N::TransactionID: Clone,
N::TransitionID: Clone,
sourcefn clone(&self) -> DeploymentMemory<N>
fn clone(&self) -> DeploymentMemory<N>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<N: Network> DeploymentStorage<N> for DeploymentMemory<N>
impl<N: Network> DeploymentStorage<N> for DeploymentMemory<N>
sourcefn open(
transition_store: TransitionStore<N, Self::TransitionStorage>
) -> Result<Self>
fn open(
transition_store: TransitionStore<N, Self::TransitionStorage>
) -> Result<Self>
Initializes the deployment storage.
sourcefn edition_map(&self) -> &Self::EditionMap
fn edition_map(&self) -> &Self::EditionMap
Returns the edition map.
sourcefn reverse_id_map(&self) -> &Self::ReverseIDMap
fn reverse_id_map(&self) -> &Self::ReverseIDMap
Returns the reverse ID map.
sourcefn program_map(&self) -> &Self::ProgramMap
fn program_map(&self) -> &Self::ProgramMap
Returns the program map.
sourcefn verifying_key_map(&self) -> &Self::VerifyingKeyMap
fn verifying_key_map(&self) -> &Self::VerifyingKeyMap
Returns the verifying key map.
sourcefn certificate_map(&self) -> &Self::CertificateMap
fn certificate_map(&self) -> &Self::CertificateMap
Returns the certificate map.
sourcefn additional_fee_map(&self) -> &Self::AdditionalFeeMap
fn additional_fee_map(&self) -> &Self::AdditionalFeeMap
Returns the additional fee map.
sourcefn transition_store(&self) -> &TransitionStore<N, Self::TransitionStorage>
fn transition_store(&self) -> &TransitionStore<N, Self::TransitionStorage>
Returns the transition store.
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
.
type EditionMap = MemoryMap<ProgramID<N>, u16>
type EditionMap = MemoryMap<ProgramID<N>, u16>
The mapping of program ID
to edition
.
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
.
type ProgramMap = MemoryMap<(ProgramID<N>, u16), Program<N>>
type ProgramMap = MemoryMap<(ProgramID<N>, u16), Program<N>>
The mapping of (program ID, edition)
to program
.
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
.
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
.
type AdditionalFeeMap = MemoryMap<<N as Network>::TransactionID, <N as Network>::TransitionID>
type AdditionalFeeMap = MemoryMap<<N as Network>::TransactionID, <N as Network>::TransitionID>
The mapping of transaction ID
to additional fee ID
.
type TransitionStorage = TransitionMemory<N>
type TransitionStorage = TransitionMemory<N>
The transition storage.
sourcefn start_atomic(&self)
fn start_atomic(&self)
Starts an atomic batch write operation.
sourcefn is_atomic_in_progress(&self) -> bool
fn is_atomic_in_progress(&self) -> bool
Checks if an atomic batch is in progress.
sourcefn abort_atomic(&self)
fn abort_atomic(&self)
Aborts an atomic batch write operation.
sourcefn finish_atomic(&self) -> Result<()>
fn finish_atomic(&self) -> Result<()>
Finishes an atomic batch write operation.
sourcefn insert(&self, transaction: &Transaction<N>) -> Result<()>
fn insert(&self, transaction: &Transaction<N>) -> Result<()>
Stores the given deployment transaction
pair into storage.
sourcefn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
Removes the deployment transaction for the given transaction ID
.
sourcefn find_transaction_id(
&self,
program_id: &ProgramID<N>
) -> Result<Option<N::TransactionID>>
fn find_transaction_id(
&self,
program_id: &ProgramID<N>
) -> Result<Option<N::TransactionID>>
Returns the transaction ID that contains the given program ID
.
sourcefn get_program_id(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<ProgramID<N>>>
fn get_program_id(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<ProgramID<N>>>
Returns the program ID for the given transaction ID
.
sourcefn get_edition(&self, program_id: &ProgramID<N>) -> Result<Option<u16>>
fn get_edition(&self, program_id: &ProgramID<N>) -> Result<Option<u16>>
Returns the edition for the given program ID
.
sourcefn get_program(&self, program_id: &ProgramID<N>) -> Result<Option<Program<N>>>
fn get_program(&self, program_id: &ProgramID<N>) -> Result<Option<Program<N>>>
Returns the program for the given program ID
.
sourcefn get_verifying_key(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>
) -> Result<Option<VerifyingKey<N>>>
fn get_verifying_key(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>
) -> Result<Option<VerifyingKey<N>>>
Returns the verifying key for the given program ID
and function name
.
sourcefn get_certificate(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>
) -> Result<Option<Certificate<N>>>
fn get_certificate(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>
) -> Result<Option<Certificate<N>>>
Returns the certificate for the given program ID
and function name
.
sourcefn get_deployment(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Deployment<N>>>
fn get_deployment(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Deployment<N>>>
Returns the deployment for the given transaction ID
.
sourcefn get_additional_fee(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<AdditionalFee<N>>>
fn get_additional_fee(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<AdditionalFee<N>>>
Returns the additional fee for the given transaction ID
.
sourcefn get_transaction(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Transaction<N>>>
fn get_transaction(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Transaction<N>>>
Returns the transaction for the given transaction ID
.
Auto Trait Implementations
impl<N> !RefUnwindSafe for DeploymentMemory<N>
impl<N> Send for DeploymentMemory<N>
impl<N> Sync for DeploymentMemory<N>
impl<N> Unpin for DeploymentMemory<N>
impl<N> !UnwindSafe for DeploymentMemory<N>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more