pub struct Transformation<T: Clone, E> {
    pub name: TransformId,
    pub description: Cow<'static, str>,
    pub input: Vec<(TypeId, Option<T>)>,
    pub output: Vec<TypeId>,
    pub algorithm: Algorithm<T, E>,
}
Expand description

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

Fields

name: TransformId

Transformation name

description: Cow<'static, str>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

Implementations

Create a new Transformation always returning a single constant

Set this transformation to the given constant value.

Ready the transformation to be called.

Check that output exists for the transform

Check that input exists for the transform

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

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

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.