Skip to main content

CanTranslate

Trait CanTranslate 

Source
pub trait CanTranslate: GeometricPrimitive + Sized {
    type Point: IsPoint;

    // Required method
    fn translate<'a, L>(&mut self, translation_vector: &L)
       where L: IsLine<'a, Self::Point>;
}
Expand description

Translates a primitive along a line-defined direction.

Required Associated Types§

Source

type Point: IsPoint

Point type used by the translation line.

Required Methods§

Source

fn translate<'a, L>(&mut self, translation_vector: &L)
where L: IsLine<'a, Self::Point>,

Mutates self by applying the translation vector.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§