Struct snarkvm_compiler::DeploymentStore
source · [−]pub struct DeploymentStore<N: Network, D: DeploymentStorage<N>> { /* private fields */ }
Expand description
The deployment store.
Implementations
sourceimpl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
impl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
sourcepub fn open(
transition_store: TransitionStore<N, D::TransitionStorage>
) -> Result<Self>
pub fn open(
transition_store: TransitionStore<N, D::TransitionStorage>
) -> Result<Self>
Initializes the deployment store.
sourcepub fn insert(&self, transaction: &Transaction<N>) -> Result<()>
pub fn insert(&self, transaction: &Transaction<N>) -> Result<()>
Stores the given deployment transaction
into storage.
sourcepub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
pub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
Removes the transaction for the given transaction ID
.
sourcepub fn start_atomic(&self)
pub fn start_atomic(&self)
Starts an atomic batch write operation.
sourcepub fn is_atomic_in_progress(&self) -> bool
pub fn is_atomic_in_progress(&self) -> bool
Checks if an atomic batch is in progress.
sourcepub fn abort_atomic(&self)
pub fn abort_atomic(&self)
Aborts an atomic batch write operation.
sourcepub fn finish_atomic(&self) -> Result<()>
pub fn finish_atomic(&self) -> Result<()>
Finishes an atomic batch write operation.
sourceimpl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
impl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
sourcepub fn get_transaction(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Transaction<N>>>
pub fn get_transaction(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Transaction<N>>>
Returns the transaction for the given transaction ID
.
sourcepub fn get_deployment(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Deployment<N>>>
pub fn get_deployment(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Deployment<N>>>
Returns the deployment for the given transaction ID
.
sourcepub fn get_edition(&self, program_id: &ProgramID<N>) -> Result<Option<u16>>
pub fn get_edition(&self, program_id: &ProgramID<N>) -> Result<Option<u16>>
Returns the edition for the given program ID
.
sourcepub fn get_program_id(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<ProgramID<N>>>
pub fn get_program_id(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<ProgramID<N>>>
Returns the program ID for the given transaction ID
.
sourcepub fn get_program(
&self,
program_id: &ProgramID<N>
) -> Result<Option<Program<N>>>
pub fn get_program(
&self,
program_id: &ProgramID<N>
) -> Result<Option<Program<N>>>
Returns the program for the given program ID
.
sourcepub fn get_verifying_key(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>
) -> Result<Option<VerifyingKey<N>>>
pub 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, function name)
.
sourcepub fn get_certificate(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>
) -> Result<Option<Certificate<N>>>
pub fn get_certificate(
&self,
program_id: &ProgramID<N>,
function_name: &Identifier<N>
) -> Result<Option<Certificate<N>>>
Returns the certificate for the given (program ID, function name)
.
sourcepub fn get_additional_fee(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<AdditionalFee<N>>>
pub fn get_additional_fee(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<AdditionalFee<N>>>
Returns the additional fee for the given transaction ID
.
sourceimpl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
impl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
sourcepub fn find_transaction_id(
&self,
program_id: &ProgramID<N>
) -> Result<Option<N::TransactionID>>
pub fn find_transaction_id(
&self,
program_id: &ProgramID<N>
) -> Result<Option<N::TransactionID>>
Returns the transaction ID that deployed the given program ID
.
sourceimpl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
impl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
sourcepub fn contains_program_id(&self, program_id: &ProgramID<N>) -> Result<bool>
pub fn contains_program_id(&self, program_id: &ProgramID<N>) -> Result<bool>
Returns true
if the given program ID exists.
sourceimpl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
impl<N: Network, D: DeploymentStorage<N>> DeploymentStore<N, D>
sourcepub fn deployment_ids(
&self
) -> impl '_ + Iterator<Item = Cow<'_, N::TransactionID>>
pub fn deployment_ids(
&self
) -> impl '_ + Iterator<Item = Cow<'_, N::TransactionID>>
Returns an iterator over the deployment transaction IDs, for all deployments.
sourcepub fn program_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, ProgramID<N>>>
pub fn program_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, ProgramID<N>>>
Returns an iterator over the program IDs, for all deployments.
sourcepub fn programs(&self) -> impl '_ + Iterator<Item = Cow<'_, Program<N>>>
pub fn programs(&self) -> impl '_ + Iterator<Item = Cow<'_, Program<N>>>
Returns an iterator over the programs, for all deployments.
sourcepub fn verifying_keys(
&self
) -> impl '_ + Iterator<Item = (Cow<'_, (ProgramID<N>, Identifier<N>, u16)>, Cow<'_, VerifyingKey<N>>)>
pub fn verifying_keys(
&self
) -> impl '_ + Iterator<Item = (Cow<'_, (ProgramID<N>, Identifier<N>, u16)>, Cow<'_, VerifyingKey<N>>)>
Returns an iterator over the ((program ID, function name, edition), verifying key)
, for all deployments.
sourcepub fn certificates(
&self
) -> impl '_ + Iterator<Item = (Cow<'_, (ProgramID<N>, Identifier<N>, u16)>, Cow<'_, Certificate<N>>)>
pub fn certificates(
&self
) -> impl '_ + Iterator<Item = (Cow<'_, (ProgramID<N>, Identifier<N>, u16)>, Cow<'_, Certificate<N>>)>
Returns an iterator over the ((program ID, function name, edition), certificate)
, for all deployments.
Trait Implementations
sourceimpl<N: Clone + Network, D: Clone + DeploymentStorage<N>> Clone for DeploymentStore<N, D>
impl<N: Clone + Network, D: Clone + DeploymentStorage<N>> Clone for DeploymentStore<N, D>
sourcefn clone(&self) -> DeploymentStore<N, D>
fn clone(&self) -> DeploymentStore<N, D>
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
Auto Trait Implementations
impl<N, D> RefUnwindSafe for DeploymentStore<N, D> where
D: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, D> Send for DeploymentStore<N, D> where
D: Send,
impl<N, D> Sync for DeploymentStore<N, D>
impl<N, D> Unpin for DeploymentStore<N, D> where
D: Unpin,
N: Unpin,
impl<N, D> UnwindSafe for DeploymentStore<N, D> where
D: UnwindSafe,
N: UnwindSafe,
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