pub trait CommandTrait<N: Network>: Clone + Parser + FromBytes + ToBytes {
    type FinalizeCommand: FinalizeCommandTrait;

    // 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 Associated Types§

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.

Implementors§

source§

impl<N: Network> CommandTrait<N> for Command<N>

§

type FinalizeCommand = FinalizeInstruction<N, { Variant::FinalizeCommand as u8 }>