Struct snarkvm_compiler::InputStore
source · [−]pub struct InputStore<N: Network, I: InputStorage<N>> { /* private fields */ }
Expand description
The transition input store.
Implementations
sourceimpl<N: Network, I: InputStorage<N>> InputStore<N, I>
impl<N: Network, I: InputStorage<N>> InputStore<N, I>
sourcepub fn insert(
&self,
transition_id: N::TransitionID,
inputs: &[Input<N>]
) -> Result<()>
pub fn insert(
&self,
transition_id: N::TransitionID,
inputs: &[Input<N>]
) -> Result<()>
Stores the given (transition ID, input)
pair into storage.
sourcepub fn remove(&self, transition_id: &N::TransitionID) -> Result<()>
pub fn remove(&self, transition_id: &N::TransitionID) -> Result<()>
Removes the input 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, I: InputStorage<N>> InputStore<N, I>
impl<N: Network, I: InputStorage<N>> InputStore<N, I>
sourcepub fn get_input_ids(
&self,
transition_id: &N::TransitionID
) -> Result<Vec<Field<N>>>
pub fn get_input_ids(
&self,
transition_id: &N::TransitionID
) -> Result<Vec<Field<N>>>
Returns the input IDs for the given transition ID
.
sourcepub fn get_inputs(
&self,
transition_id: &N::TransitionID
) -> Result<Vec<Input<N>>>
pub fn get_inputs(
&self,
transition_id: &N::TransitionID
) -> Result<Vec<Input<N>>>
Returns the inputs for the given transition ID
.
sourceimpl<N: Network, I: InputStorage<N>> InputStore<N, I>
impl<N: Network, I: InputStorage<N>> InputStore<N, I>
sourcepub fn find_transition_id(
&self,
input_id: &Field<N>
) -> Result<Option<N::TransitionID>>
pub fn find_transition_id(
&self,
input_id: &Field<N>
) -> Result<Option<N::TransitionID>>
Returns the transition ID that contains the given input ID
.
sourceimpl<N: Network, I: InputStorage<N>> InputStore<N, I>
impl<N: Network, I: InputStorage<N>> InputStore<N, I>
sourcepub fn contains_input_id(&self, input_id: &Field<N>) -> Result<bool>
pub fn contains_input_id(&self, input_id: &Field<N>) -> Result<bool>
Returns true
if the given input ID exists.
sourcepub fn contains_serial_number(&self, serial_number: &Field<N>) -> Result<bool>
pub fn contains_serial_number(&self, serial_number: &Field<N>) -> Result<bool>
Returns true
if the given serial number exists.
sourcepub fn contains_tag(&self, tag: &Field<N>) -> Result<bool>
pub fn contains_tag(&self, tag: &Field<N>) -> Result<bool>
Returns true
if the given tag exists.
sourceimpl<N: Network, I: InputStorage<N>> InputStore<N, I>
impl<N: Network, I: InputStorage<N>> InputStore<N, I>
sourcepub fn input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the input IDs, for all transition inputs.
sourcepub fn constant_input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn constant_input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the constant input IDs, for all transition inputs that are constant.
sourcepub fn public_input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn public_input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the public input IDs, for all transition inputs that are public.
sourcepub fn private_input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn private_input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the private input IDs, for all transition inputs that are private.
sourcepub fn serial_numbers(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn serial_numbers(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the serial numbers, for all transition inputs that are records.
sourcepub fn external_input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
pub fn external_input_ids(&self) -> impl '_ + Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the external record input IDs, for all transition inputs that are external records.
sourceimpl<N: Network, I: InputStorage<N>> InputStore<N, I>
impl<N: Network, I: InputStorage<N>> InputStore<N, I>
sourcepub fn constant_inputs(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Plaintext<N>>>
pub fn constant_inputs(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Plaintext<N>>>
Returns an iterator over the constant inputs, for all transitions.
sourcepub fn public_inputs(&self) -> impl '_ + Iterator<Item = Cow<'_, Plaintext<N>>>
pub fn public_inputs(&self) -> impl '_ + Iterator<Item = Cow<'_, Plaintext<N>>>
Returns an iterator over the constant inputs, for all transitions.
sourcepub fn private_inputs(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Ciphertext<N>>>
pub fn private_inputs(
&self
) -> impl '_ + Iterator<Item = Cow<'_, Ciphertext<N>>>
Returns an iterator over the private inputs, for all transitions.
Returns an iterator over the tags, for all transition inputs that are records.
Trait Implementations
sourceimpl<N: Clone + Network, I: Clone + InputStorage<N>> Clone for InputStore<N, I> where
I::ConstantMap: Clone,
I::PublicMap: Clone,
I::PrivateMap: Clone,
I::RecordMap: Clone,
I::RecordTagMap: Clone,
I::ExternalRecordMap: Clone,
impl<N: Clone + Network, I: Clone + InputStorage<N>> Clone for InputStore<N, I> where
I::ConstantMap: Clone,
I::PublicMap: Clone,
I::PrivateMap: Clone,
I::RecordMap: Clone,
I::RecordTagMap: Clone,
I::ExternalRecordMap: Clone,
sourcefn clone(&self) -> InputStore<N, I>
fn clone(&self) -> InputStore<N, I>
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, I> RefUnwindSafe for InputStore<N, I> where
I: RefUnwindSafe,
<I as InputStorage<N>>::ConstantMap: RefUnwindSafe,
<I as InputStorage<N>>::ExternalRecordMap: RefUnwindSafe,
<I as InputStorage<N>>::PrivateMap: RefUnwindSafe,
<I as InputStorage<N>>::PublicMap: RefUnwindSafe,
<I as InputStorage<N>>::RecordMap: RefUnwindSafe,
<I as InputStorage<N>>::RecordTagMap: RefUnwindSafe,
impl<N, I> Send for InputStore<N, I> where
I: Send,
<I as InputStorage<N>>::ConstantMap: Send,
<I as InputStorage<N>>::ExternalRecordMap: Send,
<I as InputStorage<N>>::PrivateMap: Send,
<I as InputStorage<N>>::PublicMap: Send,
<I as InputStorage<N>>::RecordMap: Send,
<I as InputStorage<N>>::RecordTagMap: Send,
impl<N, I> Sync for InputStore<N, I>
impl<N, I> Unpin for InputStore<N, I> where
I: Unpin,
<I as InputStorage<N>>::ConstantMap: Unpin,
<I as InputStorage<N>>::ExternalRecordMap: Unpin,
<I as InputStorage<N>>::PrivateMap: Unpin,
<I as InputStorage<N>>::PublicMap: Unpin,
<I as InputStorage<N>>::RecordMap: Unpin,
<I as InputStorage<N>>::RecordTagMap: Unpin,
impl<N, I> UnwindSafe for InputStore<N, I> where
I: UnwindSafe,
<I as InputStorage<N>>::ConstantMap: UnwindSafe,
<I as InputStorage<N>>::ExternalRecordMap: UnwindSafe,
<I as InputStorage<N>>::PrivateMap: UnwindSafe,
<I as InputStorage<N>>::PublicMap: UnwindSafe,
<I as InputStorage<N>>::RecordMap: UnwindSafe,
<I as InputStorage<N>>::RecordTagMap: 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