substrate::geometry::transform

Trait Translate

Source
pub trait Translate: Sized + TranslateMut {
    // Provided method
    fn translate(self, p: Point) -> Self { ... }
}
Expand description

A trait for specifying how a shape is translated by a Point.

Takes in an owned copy of the shape and returns the translated version.

Provided Methods§

Source

fn translate(self, p: Point) -> Self

Translates the shape by a Point through mutation.

Creates a new shape at a location equal to the translation of the original.

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§

Source§

impl<T> Translate for T
where T: TranslateMut,