[][src]Struct aflak_cake::Transformation

pub struct Transformation<T: Clone, E> {
    pub name: TransformId,
    pub input: Vec<(TypeId, Option<T>)>,
    pub output: Vec<TypeId>,
    pub algorithm: Algorithm<T, E>,
}

A transformation defined by an Algorithm, with a determined number of inputs and outputs.

Fields

name: TransformId

Transformation name

input: Vec<(TypeId, Option<T>)>

Inputs of the transformation, may include a default value

output: Vec<TypeId>

Outputs of the transformation

algorithm: Algorithm<T, E>

Algorithm defining the transformation

Methods

impl<T, E> Transformation<T, E> where
    T: Clone + VariantName
[src]

pub fn new_constant(t: T) -> Self[src]

Create a new Transformation always returning a single constant

pub fn set_constant(&mut self, t: T)[src]

Set this transformation to the given constant value.

impl<T, E> Transformation<T, E> where
    T: Clone
[src]

pub fn start(&self) -> TransformationCaller<T, E>[src]

Ready the transformation to be called.

pub fn output_exists(&self, output_i: usize) -> bool[src]

Check that output exists for the transform

pub fn input_exists(&self, input_i: usize) -> bool[src]

Check that input exists for the transform

pub fn nth_output_type(&self, output_i: usize) -> TypeId[src]

Return nth output type. Panic if output_i > self.output.len()

pub fn nth_input_type(&self, input_i: usize) -> TypeId[src]

Return nth input type. Panic if input_i > self.input.len()

Trait Implementations

impl<T: Clone + Clone, E: Clone> Clone for Transformation<T, E>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Debug + Clone, E: Debug> Debug for Transformation<T, E>[src]

Auto Trait Implementations

impl<T, E> Send for Transformation<T, E> where
    T: Send

impl<T, E> Sync for Transformation<T, E> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]