Struct snarkvm_compiler::OutputStore
source · [−]pub struct OutputStore<N: Network, O: OutputStorage<N>> { /* private fields */ }Expand description
The transition output store.
Implementations
sourceimpl<N: Network, O: OutputStorage<N>> OutputStore<N, O>
impl<N: Network, O: OutputStorage<N>> OutputStore<N, O>
sourcepub fn insert(
&self,
transition_id: N::TransitionID,
outputs: &[Output<N>]
) -> Result<()>
pub fn insert(
&self,
transition_id: N::TransitionID,
outputs: &[Output<N>]
) -> Result<()>
Stores the given (transition ID, output) pair into storage.
sourcepub fn remove(&self, transition_id: &N::TransitionID) -> Result<()>
pub fn remove(&self, transition_id: &N::TransitionID) -> Result<()>
Removes the output for the given transition 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, O: OutputStorage<N>> OutputStore<N, O>
impl<N: Network, O: OutputStorage<N>> OutputStore<N, O>
sourcepub fn get_output_ids(
&self,
transition_id: &N::TransitionID
) -> Result<Vec<Field<N>>>
pub fn get_output_ids(
&self,
transition_id: &N::TransitionID
) -> Result<Vec<Field<N>>>
Returns the output IDs for the given transition ID.
sourcepub fn get_outputs(
&self,
transition_id: &N::TransitionID
) -> Result<Vec<Output<N>>>
pub fn get_outputs(
&self,
transition_id: &N::TransitionID
) -> Result<Vec<Output<N>>>
Returns the outputs for the given transition ID.
sourcepub fn get_record(
&self,
commitment: &Field<N>
) -> Result<Option<Record<N, Ciphertext<N>>>>
pub fn get_record(
&self,
commitment: &Field<N>
) -> Result<Option<Record<N, Ciphertext<N>>>>
Returns the record for the given commitment.
If the record exists, Ok(Some(record)) is returned.
If the record was purged, Ok(None) is returned.
If the record does not exist, Err(error) is returned.
sourceimpl<N: Network, O: OutputStorage<N>> OutputStore<N, O>
impl<N: Network, O: OutputStorage<N>> OutputStore<N, O>
sourcepub fn find_transition_id(
&self,
output_id: &Field<N>
) -> Result<Option<N::TransitionID>>
pub fn find_transition_id(
&self,
output_id: &Field<N>
) -> Result<Option<N::TransitionID>>
Returns the transition ID that contains the given output ID.
sourceimpl<N: Network, O: OutputStorage<N>> OutputStore<N, O>
impl<N: Network, O: OutputStorage<N>> OutputStore<N, O>
sourcepub fn contains_output_id(&self, output_id: &Field<N>) -> Result<bool>
pub fn contains_output_id(&self, output_id: &Field<N>) -> Result<bool>
Returns true if the given output ID exists.
sourcepub fn contains_commitment(&self, commitment: &Field<N>) -> Result<bool>
pub fn contains_commitment(&self, commitment: &Field<N>) -> Result<bool>
Returns true if the given commitment exists.
sourcepub fn contains_checksum(&self, checksum: &Field<N>) -> bool
pub fn contains_checksum(&self, checksum: &Field<N>) -> bool
Returns true if the given checksum exists.
sourcepub fn contains_nonce(&self, nonce: &Group<N>) -> Result<bool>
pub fn contains_nonce(&self, nonce: &Group<N>) -> Result<bool>
Returns true if the given nonce exists.
sourceimpl<N: Network, O: OutputStorage<N>> OutputStore<N, O>
impl<N: Network, O: OutputStorage<N>> OutputStore<N, O>
sourcepub fn output_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn output_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the output IDs, for all transition outputs.
sourcepub fn constant_output_ids(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn constant_output_ids(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the constant output IDs, for all transition outputs that are constant.
sourcepub fn public_output_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn public_output_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the public output IDs, for all transition outputs that are public.
sourcepub fn private_output_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn private_output_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the private output IDs, for all transition outputs that are private.
sourcepub fn commitments(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn commitments(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the commitments, for all transition outputs that are records.
sourcepub fn external_output_ids(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn external_output_ids(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the external record output IDs, for all transition outputs that are external records.
sourceimpl<N: Network, I: OutputStorage<N>> OutputStore<N, I>
impl<N: Network, I: OutputStorage<N>> OutputStore<N, I>
sourcepub fn constant_outputs(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Plaintext<N>>>
pub fn constant_outputs(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Plaintext<N>>>
Returns an iterator over the constant outputs, for all transitions.
sourcepub fn public_outputs(&self) -> impl '_ + Iterator<Item = Cow<'_, Plaintext<N>>>
pub fn public_outputs(&self) -> impl '_ + Iterator<Item = Cow<'_, Plaintext<N>>>
Returns an iterator over the constant outputs, for all transitions.
sourcepub fn private_outputs(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Ciphertext<N>>>
pub fn private_outputs(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Ciphertext<N>>>
Returns an iterator over the private outputs, for all transitions.
sourcepub fn checksums(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn checksums(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the checksums, for all transition outputs that are records.
Trait Implementations
sourceimpl<N: Clone + Network, O: Clone + OutputStorage<N>> Clone for OutputStore<N, O> where
O::ConstantMap: Clone,
O::PublicMap: Clone,
O::PrivateMap: Clone,
O::RecordMap: Clone,
O::RecordNonceMap: Clone,
O::ExternalRecordMap: Clone,
impl<N: Clone + Network, O: Clone + OutputStorage<N>> Clone for OutputStore<N, O> where
O::ConstantMap: Clone,
O::PublicMap: Clone,
O::PrivateMap: Clone,
O::RecordMap: Clone,
O::RecordNonceMap: Clone,
O::ExternalRecordMap: Clone,
sourcefn clone(&self) -> OutputStore<N, O>
fn clone(&self) -> OutputStore<N, O>
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, O> RefUnwindSafe for OutputStore<N, O> where
O: RefUnwindSafe,
<O as OutputStorage<N>>::ConstantMap: RefUnwindSafe,
<O as OutputStorage<N>>::ExternalRecordMap: RefUnwindSafe,
<O as OutputStorage<N>>::PrivateMap: RefUnwindSafe,
<O as OutputStorage<N>>::PublicMap: RefUnwindSafe,
<O as OutputStorage<N>>::RecordMap: RefUnwindSafe,
<O as OutputStorage<N>>::RecordNonceMap: RefUnwindSafe,
impl<N, O> Send for OutputStore<N, O> where
O: Send,
<O as OutputStorage<N>>::ConstantMap: Send,
<O as OutputStorage<N>>::ExternalRecordMap: Send,
<O as OutputStorage<N>>::PrivateMap: Send,
<O as OutputStorage<N>>::PublicMap: Send,
<O as OutputStorage<N>>::RecordMap: Send,
<O as OutputStorage<N>>::RecordNonceMap: Send,
impl<N, O> Sync for OutputStore<N, O>
impl<N, O> Unpin for OutputStore<N, O> where
O: Unpin,
<O as OutputStorage<N>>::ConstantMap: Unpin,
<O as OutputStorage<N>>::ExternalRecordMap: Unpin,
<O as OutputStorage<N>>::PrivateMap: Unpin,
<O as OutputStorage<N>>::PublicMap: Unpin,
<O as OutputStorage<N>>::RecordMap: Unpin,
<O as OutputStorage<N>>::RecordNonceMap: Unpin,
impl<N, O> UnwindSafe for OutputStore<N, O> where
O: UnwindSafe,
<O as OutputStorage<N>>::ConstantMap: UnwindSafe,
<O as OutputStorage<N>>::ExternalRecordMap: UnwindSafe,
<O as OutputStorage<N>>::PrivateMap: UnwindSafe,
<O as OutputStorage<N>>::PublicMap: UnwindSafe,
<O as OutputStorage<N>>::RecordMap: UnwindSafe,
<O as OutputStorage<N>>::RecordNonceMap: 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