snarkvm_synthesizer_program::traits

Trait CommandTrait

Source
pub trait CommandTrait<N: Network>:
    Clone
    + Parser
    + FromBytes
    + ToBytes {
    // Required methods
    fn destinations(&self) -> Vec<Register<N>>;
    fn branch_to(&self) -> Option<&Identifier<N>>;
    fn position(&self) -> Option<&Identifier<N>>;
    fn is_call(&self) -> bool;
    fn is_cast_to_record(&self) -> bool;
    fn is_write(&self) -> bool;
}

Required Methods§

Source

fn destinations(&self) -> Vec<Register<N>>

Returns the destination registers of the command.

Source

fn branch_to(&self) -> Option<&Identifier<N>>

Returns the branch target, if the command is a branch command.

Source

fn position(&self) -> Option<&Identifier<N>>

Returns the position name, if the command is a position command.

Source

fn is_call(&self) -> bool

Returns true if the command is a call instruction.

Source

fn is_cast_to_record(&self) -> bool

Returns true if the command is a cast to record instruction.

Source

fn is_write(&self) -> bool

Returns true if the command is a write operation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§