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.
Initialize the destination by cloning the reference, then reuse it for that reference’s transforms.
For SPolygon, matching vertex counts alone is
insufficient: the destination must retain the same shape invariants and surrogate configuration.
Required Methods§
Sourcefn transform_from(&mut self, reference: &Self, t: &Transformation) -> &mut Self
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".