pub enum ScreenOrientation {
Portrait,
Landscape,
PortraitUpsideDown,
LandscapeLeft,
LandscapeRight,
}Expand description
Normalized device or window screen orientation across mobile, tablet, desktop, and web.
Variants§
Portrait
Standard upright portrait orientation (height >= width).
Landscape
Standard horizontal landscape orientation (width > height).
PortraitUpsideDown
Upside-down portrait orientation.
LandscapeLeft
Landscape orientation rotated counter-clockwise.
LandscapeRight
Landscape orientation rotated clockwise.
Implementations§
Source§impl ScreenOrientation
Orientation classification helpers for ScreenOrientation.
impl ScreenOrientation
Orientation classification helpers for ScreenOrientation.
Sourcepub fn is_landscape(&self) -> bool
pub fn is_landscape(&self) -> bool
Sourcepub fn is_portrait(&self) -> bool
pub fn is_portrait(&self) -> bool
Trait Implementations§
Source§impl Clone for ScreenOrientation
impl Clone for ScreenOrientation
impl Copy for ScreenOrientation
Source§impl Debug for ScreenOrientation
impl Debug for ScreenOrientation
Source§impl Default for ScreenOrientation
impl Default for ScreenOrientation
impl Eq for ScreenOrientation
Source§impl Hash for ScreenOrientation
impl Hash for ScreenOrientation
Source§impl Ord for ScreenOrientation
impl Ord for ScreenOrientation
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ScreenOrientation
impl PartialEq for ScreenOrientation
Source§impl PartialOrd for ScreenOrientation
impl PartialOrd for ScreenOrientation
impl StructuralPartialEq for ScreenOrientation
Auto Trait Implementations§
impl Forget for ScreenOrientation
impl Freeze for ScreenOrientation
impl Move for ScreenOrientation
impl RefUnwindSafe for ScreenOrientation
impl Send for ScreenOrientation
impl Sync for ScreenOrientation
impl Unpin for ScreenOrientation
impl UnsafeUnpin for ScreenOrientation
impl UnwindSafe for ScreenOrientation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more