Enum aflak_cake::Algorithm
source · pub enum Algorithm<T: Clone, E> {
Function(fn(_: Vec<Cow<'_, T>>) -> Vec<Result<T, E>>),
Constant(Vec<T>),
}
Expand description
Algorithm that defines the transformation
Variants
Function(fn(_: Vec<Cow<'_, T>>) -> Vec<Result<T, E>>)
A rust function with a vector of input variables as argument.
Returns a vector of Result
, one result for each output.
Constant(Vec<T>)
Use this variant for algorithms with no input. Such algorithm will always return this constant.
Trait Implementations
Auto Trait Implementations
impl<T, E> RefUnwindSafe for Algorithm<T, E>where
T: RefUnwindSafe,
impl<T, E> Send for Algorithm<T, E>where
T: Send,
impl<T, E> Sync for Algorithm<T, E>where
T: Sync,
impl<T, E> Unpin for Algorithm<T, E>where
T: Unpin,
impl<T, E> UnwindSafe for Algorithm<T, E>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more