Struct stal::Stal [] [src]

pub struct Stal {
    // some fields omitted
}

An operation to be executed on a set

Methods

impl Stal

fn new(operation: String, set: Set) -> Self

fn from_template(command: Vec<Vec<u8>>, sets: Vec<(Set, usize)>) -> Self

Takes an arbitrary command that uses one or more sets. The command must have placeholders where the set keys should go. Each element in sets specifies the position in the command.

fn explain(&self) -> Vec<Vec<Vec<u8>>>

Returns a list of operations to run. For debug only.

fn solve(&self) -> (Vec<Vec<Vec<u8>>>, usize)

Returns a lit of operations, wrapped in a multi/exec. The last operation is always exec, and the returned usize indicates the return value of the operation.