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(
&self
) -> Option<&(Command::FinalizeCommand, FinalizeCore<N, Command>)>
pub const fn finalize( &self ) -> Option<&(Command::FinalizeCommand, FinalizeCore<N, Command>)>
Returns the function finalize logic.
sourcepub fn finalize_command(&self) -> Option<&Command::FinalizeCommand>
pub fn finalize_command(&self) -> Option<&Command::FinalizeCommand>
Returns the function finalize command.
sourcepub fn finalize_logic(&self) -> Option<&FinalizeCore<N, Command>>
pub 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 command has been added.
Trait Implementations§
source§impl<N: Clone + Network, Instruction: Clone + InstructionTrait<N>, Command: Clone + CommandTrait<N>> Clone for FunctionCore<N, Instruction, Command>where
Command::FinalizeCommand: Clone,
impl<N: Clone + Network, Instruction: Clone + InstructionTrait<N>, Command: Clone + CommandTrait<N>> Clone for FunctionCore<N, Instruction, Command>where Command::FinalizeCommand: Clone,
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<FunctionCore<N, Instruction, Command>> for FunctionCore<N, Instruction, Command>where
Command::FinalizeCommand: PartialEq,
impl<N: PartialEq + Network, Instruction: PartialEq + InstructionTrait<N>, Command: PartialEq + CommandTrait<N>> PartialEq<FunctionCore<N, Instruction, Command>> for FunctionCore<N, Instruction, Command>where Command::FinalizeCommand: PartialEq,
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>where Command::FinalizeCommand: Eq,
impl<N: Network, Instruction: InstructionTrait<N>, Command: CommandTrait<N>> StructuralEq 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, <Command as CommandTrait<N>>::FinalizeCommand: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe,
impl<N, Instruction, Command> Send for FunctionCore<N, Instruction, Command>where Command: Send, Instruction: Send, <Command as CommandTrait<N>>::FinalizeCommand: Send,
impl<N, Instruction, Command> Sync for FunctionCore<N, Instruction, Command>where Command: Sync, Instruction: Sync, <Command as CommandTrait<N>>::FinalizeCommand: Sync,
impl<N, Instruction, Command> Unpin for FunctionCore<N, Instruction, Command>where Command: Unpin, Instruction: Unpin, N: Unpin, <N as Environment>::Field: Unpin, <Command as CommandTrait<N>>::FinalizeCommand: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin,
impl<N, Instruction, Command> UnwindSafe for FunctionCore<N, Instruction, Command>where Command: UnwindSafe, Instruction: UnwindSafe, N: UnwindSafe, <N as Environment>::Field: UnwindSafe, <Command as CommandTrait<N>>::FinalizeCommand: 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.