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§
sourcefn destinations(&self) -> Vec<Register<N>>
fn destinations(&self) -> Vec<Register<N>>
Returns the destination registers of the command.
sourcefn branch_to(&self) -> Option<&Identifier<N>>
fn branch_to(&self) -> Option<&Identifier<N>>
Returns the branch target, if the command is a branch command.
sourcefn position(&self) -> Option<&Identifier<N>>
fn position(&self) -> Option<&Identifier<N>>
Returns the position name, if the command is a position command.
sourcefn is_cast_to_record(&self) -> bool
fn is_cast_to_record(&self) -> bool
Returns true
if the command is a cast to record instruction.