ux-dx 0.2.1

3D Graphics Primitives for Angular Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fmt;

/// A display orientation for devices, used by `Stage.lockOrientation()`.
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum Orientation {
    Portrait,
    Landscape,
}

impl fmt::Display for Orientation {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match self {
            Orientation::Landscape => write!(f, "Orientation::Landscape"),
            Orientation::Portrait => write!(f, "Orientation::Portrait"),
        }
    }
}