pub struct FunctionCore<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> { /* private fields */ }
Implementations§
source§impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> FunctionCore<N, Instruction, Command>
sourcepub fn input_types(&self) -> Vec<ValueType<N>>
pub fn input_types(&self) -> Vec<ValueType<N>>
Returns the function input types.
sourcepub fn instructions(&self) -> &[Instruction]
pub fn instructions(&self) -> &[Instruction]
Returns the function instructions.
sourcepub fn output_types(&self) -> Vec<ValueType<N>>
pub fn output_types(&self) -> Vec<ValueType<N>>
Returns the function output types.
sourcepub const fn finalize_logic(&self) -> Option<&FinalizeCore<N, Command>>
pub const fn finalize_logic(&self) -> Option<&FinalizeCore<N, Command>>
Returns the function finalize logic.
source§impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> FunctionCore<N, Instruction, Command>
sourcepub fn add_instruction(&mut self, instruction: Instruction) -> Result<()>
pub fn add_instruction(&mut self, instruction: Instruction) -> Result<()>
Adds the given instruction to the function.
§Errors
This method will halt if there are output statements already. This method will halt if the maximum number of instructions has been reached. This method will halt if a finalize logic has been added.
Trait Implementations§
source§impl<N: Clone + Network, Instruction: Clone + InstructionTrait<N>, Command: Clone + CommandTrait<N>> Clone for FunctionCore<N, Instruction, Command>
impl<N: Clone + Network, Instruction: Clone + InstructionTrait<N>, Command: Clone + CommandTrait<N>> Clone for FunctionCore<N, Instruction, Command>
source§fn clone(&self) -> FunctionCore<N, Instruction, Command>
fn clone(&self) -> FunctionCore<N, Instruction, Command>
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>, Command: CommandTrait<N>> Debug for FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> Debug for FunctionCore<N, Instruction, Command>
source§impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> Display for FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> Display for FunctionCore<N, Instruction, Command>
source§impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> FromBytes for FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> FromBytes for FunctionCore<N, Instruction, Command>
source§impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> FromStr for FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> FromStr for FunctionCore<N, Instruction, Command>
source§impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> Parser for FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> Parser for FunctionCore<N, Instruction, Command>
source§impl<N: PartialEq + Network, Instruction: PartialEq + InstructionTrait<N>, Command: PartialEq + CommandTrait<N>> PartialEq for FunctionCore<N, Instruction, Command>
impl<N: PartialEq + Network, Instruction: PartialEq + InstructionTrait<N>, Command: PartialEq + CommandTrait<N>> PartialEq for FunctionCore<N, Instruction, Command>
source§fn eq(&self, other: &FunctionCore<N, Instruction, Command>) -> bool
fn eq(&self, other: &FunctionCore<N, Instruction, Command>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> ToBytes for FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> ToBytes for FunctionCore<N, Instruction, Command>
source§impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> TypeName for FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> TypeName for FunctionCore<N, Instruction, Command>
impl<N: Eq + Network, Instruction: Eq + InstructionTrait<N>, Command: Eq + CommandTrait<N>> Eq for FunctionCore<N, Instruction, Command>
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> StructuralPartialEq for FunctionCore<N, Instruction, Command>
Auto Trait Implementations§
impl<N, Instruction, Command> RefUnwindSafe for FunctionCore<N, Instruction, Command>where
Command: RefUnwindSafe,
Instruction: RefUnwindSafe,
N: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
impl<N, Instruction, Command> Send for FunctionCore<N, Instruction, Command>
impl<N, Instruction, Command> Sync for FunctionCore<N, Instruction, Command>
impl<N, Instruction, Command> Unpin for FunctionCore<N, Instruction, Command>
impl<N, Instruction, Command> UnwindSafe for FunctionCore<N, Instruction, Command>where
Command: UnwindSafe,
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 Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.