Trait hotdrink_rs::planner::MethodSpec[][src]

pub trait MethodSpec: Vertex {
    type Arg;
    fn new(
        name: String,
        inputs: Vec<usize>,
        outputs: Vec<usize>,
        apply: MethodFunction<Self::Arg>
    ) -> Self;
fn apply(&self, args: Vec<Arc<Self::Arg>>) -> MethodResult<Arc<Self::Arg>>;
fn name(&self) -> &str; }

An extension of the Vertex trait for methods.

Associated Types

type Arg[src]

The input and output type of the method.

Loading content...

Required methods

fn new(
    name: String,
    inputs: Vec<usize>,
    outputs: Vec<usize>,
    apply: MethodFunction<Self::Arg>
) -> Self
[src]

Constructs a new MethodSpec with the specified name, inputs, outputs, and function.

fn apply(&self, args: Vec<Arc<Self::Arg>>) -> MethodResult<Arc<Self::Arg>>[src]

Applies the provided arguments to the inner function of the method.

fn name(&self) -> &str[src]

Returns a reference to the name of the method.

Loading content...

Implementors

impl<T> MethodSpec for Method<T>[src]

type Arg = T

fn apply(&self, input: Vec<Arc<T>>) -> MethodResult<Arc<T>>[src]

Apply the inner function of this method

Loading content...