geometry::transform

Trait TranslateRef

Source
pub trait TranslateRef: Sized {
    // Required method
    fn translate_ref(&self, p: Point) -> Self;
}
Expand description

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

Required Methods§

Source

fn translate_ref(&self, p: Point) -> Self

Translates the shape by Point, returning a new shape.

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 TranslateRef for ()

Source§

fn translate_ref(&self, _p: Point) -> Self

Source§

impl<T: TranslateRef> TranslateRef for Option<T>

Source§

fn translate_ref(&self, p: Point) -> Self

Source§

impl<T: TranslateRef> TranslateRef for Vec<T>

Source§

fn translate_ref(&self, p: Point) -> Self

Implementors§