Struct snarkvm_synthesizer_program::ClosureCore
source · pub struct ClosureCore<N: Network, Instruction: InstructionTrait<N>> { /* private fields */ }
Implementations§
source§impl<N: Network, Instruction: InstructionTrait<N>> ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> ClosureCore<N, Instruction>
sourcepub fn instructions(&self) -> &[Instruction]
pub fn instructions(&self) -> &[Instruction]
Returns the closure instructions.
source§impl<N: Network, Instruction: InstructionTrait<N>> ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> ClosureCore<N, Instruction>
sourcepub fn add_instruction(&mut self, instruction: Instruction) -> Result<()>
pub fn add_instruction(&mut self, instruction: Instruction) -> Result<()>
Adds the given instruction to the closure.
Errors
This method will halt if there are output statements already. This method will halt if the maximum number of instructions has been reached.
Trait Implementations§
source§impl<N: Clone + Network, Instruction: Clone + InstructionTrait<N>> Clone for ClosureCore<N, Instruction>
impl<N: Clone + Network, Instruction: Clone + InstructionTrait<N>> Clone for ClosureCore<N, Instruction>
source§fn clone(&self) -> ClosureCore<N, Instruction>
fn clone(&self) -> ClosureCore<N, Instruction>
Returns a copy 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: Network, Instruction: InstructionTrait<N>> Debug for ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> Debug for ClosureCore<N, Instruction>
source§impl<N: Network, Instruction: InstructionTrait<N>> Display for ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> Display for ClosureCore<N, Instruction>
source§impl<N: Network, Instruction: InstructionTrait<N>> FromBytes for ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> FromBytes for ClosureCore<N, Instruction>
source§impl<N: Network, Instruction: InstructionTrait<N>> FromStr for ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> FromStr for ClosureCore<N, Instruction>
source§impl<N: Network, Instruction: InstructionTrait<N>> Parser for ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> Parser for ClosureCore<N, Instruction>
source§impl<N: PartialEq + Network, Instruction: PartialEq + InstructionTrait<N>> PartialEq for ClosureCore<N, Instruction>
impl<N: PartialEq + Network, Instruction: PartialEq + InstructionTrait<N>> PartialEq for ClosureCore<N, Instruction>
source§fn eq(&self, other: &ClosureCore<N, Instruction>) -> bool
fn eq(&self, other: &ClosureCore<N, Instruction>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<N: Network, Instruction: InstructionTrait<N>> ToBytes for ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> ToBytes for ClosureCore<N, Instruction>
source§impl<N: Network, Instruction: InstructionTrait<N>> TypeName for ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> TypeName for ClosureCore<N, Instruction>
impl<N: Eq + Network, Instruction: Eq + InstructionTrait<N>> Eq for ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> StructuralEq for ClosureCore<N, Instruction>
impl<N: Network, Instruction: InstructionTrait<N>> StructuralPartialEq for ClosureCore<N, Instruction>
Auto Trait Implementations§
impl<N, Instruction> RefUnwindSafe for ClosureCore<N, Instruction>where Instruction: RefUnwindSafe, N: RefUnwindSafe, <N as Environment>::Field: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe,
impl<N, Instruction> Send for ClosureCore<N, Instruction>where Instruction: Send,
impl<N, Instruction> Sync for ClosureCore<N, Instruction>where Instruction: Sync,
impl<N, Instruction> Unpin for ClosureCore<N, Instruction>where Instruction: Unpin, N: Unpin, <N as Environment>::Field: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin,
impl<N, Instruction> UnwindSafe for ClosureCore<N, Instruction>where Instruction: UnwindSafe, N: UnwindSafe, <N as Environment>::Field: UnwindSafe, <N as Environment>::Projective: UnwindSafe, <N as Environment>::Scalar: UnwindSafe,
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.