Trait orzir_core::ControlFlow

source ·
pub trait ControlFlow {
    // Required methods
    fn num_successors(&self) -> usize;
    fn get_successor(&self, index: usize) -> Option<&Successor>;
    fn set_successor(
        &mut self,
        index: usize,
        successor: Successor
    ) -> Option<Successor>;

    // Provided method
    fn successors(&self) -> Vec<&Successor> { ... }
}
Expand description

Builtin type interface.

This trait provides methods to interact with types. This is set to be a mandatory interface for all operations for performance reasons.

Required Methods§

source

fn num_successors(&self) -> usize

Get the number of successors.

source

fn get_successor(&self, index: usize) -> Option<&Successor>

Get the successor at the given index.

source

fn set_successor( &mut self, index: usize, successor: Successor ) -> Option<Successor>

Set the successor at the given index and return the old successor (if any).

Provided Methods§

source

fn successors(&self) -> Vec<&Successor>

Get all successors.

Implementors§