Trait TransformableFrom

Source
pub trait TransformableFrom: Transformable {
    // Required method
    fn transform_from(
        &mut self,
        reference: &Self,
        t: &Transformation,
    ) -> &mut Self;
}
Expand description

Trait for types that can modify themselves to a reference object with a Transformation applied.

Useful when repeatedly transforming a single object without having to reallocate new memory each time.

Required Methods§

Source

fn transform_from(&mut self, reference: &Self, t: &Transformation) -> &mut Self

Applies a transformation on the reference object and stores the result in self.

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.

Implementors§