Direction

Trait Direction 

Source
pub trait Direction:
    Sized
    + Debug
    + Send
    + Sync
    + 'static {
    type Pos: Direction;

    // Required methods
    fn unit() -> Vec2;
    fn main(v: Vec2) -> Vec2;
    fn main_vec(v: f32) -> Vec2;
    fn len(v: Vec2) -> f32;
    fn project(v: Vec2) -> f32;
    fn side(v: Vec2) -> Vec2;
    fn side_vec(v: f32) -> Vec2;
    fn signum(v: Vec2) -> Vec2;
    fn reversed() -> bool;
    fn bucket(anc: Vec2) -> Trinary;
}
Expand description

Direction of a layout.

Required Associated Types§

Required Methods§

Source

fn unit() -> Vec2

Source

fn main(v: Vec2) -> Vec2

Source

fn main_vec(v: f32) -> Vec2

Source

fn len(v: Vec2) -> f32

Source

fn project(v: Vec2) -> f32

Source

fn side(v: Vec2) -> Vec2

Source

fn side_vec(v: f32) -> Vec2

Source

fn signum(v: Vec2) -> Vec2

Source

fn reversed() -> bool

Source

fn bucket(anc: Vec2) -> Trinary

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 Direction for X

Source§

type Pos = X

Source§

impl Direction for Y

Source§

type Pos = Y

Source§

impl<T> Direction for Stretch<T>
where T: Direction,

Source§

type Pos = <T as Direction>::Pos

Source§

impl<T: Direction> Direction for Rev<T>

Source§

type Pos = <T as Direction>::Pos