Transform

Trait Transform 

Source
pub trait Transform<T> {
    type C<_T>;

    // Required method
    fn transform<U, F>(&self, dirac: F) -> Self::C<U>
       where F: FnMut(&T) -> U;
}
Expand description

A trait denoting objects capable of being transformed by another object.

Required Associated Types§

Source

type C<_T>

the expected output type after the transformation is applied

Required Methods§

Source

fn transform<U, F>(&self, dirac: F) -> Self::C<U>
where F: FnMut(&T) -> U,

transform the object self using the transformation defined by dirac.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> Transform<T> for Vec<T>

Source§

type C<U> = Vec<U>

Source§

fn transform<U, F>(&self, dirac: F) -> Self::C<U>
where F: FnMut(&T) -> U,

Implementors§