Enum webmanifest::Orientation
source · pub enum Orientation {
Any,
Natural,
Landscape,
LandscapePrimary,
LandscapeSecondary,
Portrait,
PortraitPrimary,
PortraitSecondary,
}
Expand description
Defines the default orientation for all the website’s top level browsing contexts. Read more.
Example
let name = "My Cool Application";
let manifest = Manifest::builder(name)
.orientation(Orientation::Portrait)
.build()?;
Variants§
Any
Enable portrait-primary
, portrait-secondary
, landscape-primary
and
landscape-secondary
orientations.
Natural
Enable portrait-primary
or landscape-primary
orientations such as the
associated current orientation angle is 0.
Landscape
The screen width is greater than the screen height. This enables both
landscape-primary
and landscape-secondary
orientations.
LandscapePrimary
The screen width is greater than the screen height, and there are multiple orientations possible. This is the first of those possible orientations.
LandscapeSecondary
The screen width is greater than the screen height, and there are multiple orientations possible. This is the second of those possible orientations.
Portrait
The screen height is greater than the screen width. This enables both
portrait-primary
and portrait-secondary
orientations.
PortraitPrimary
The screen height is greater than the screen width, and there are multiple orientations possible. This is the first of those possible orientations.
PortraitSecondary
The screen height is greater than the screen width, and there are multiple orientations possible. This is the second of those possible orientations.
Trait Implementations§
source§impl Clone for Orientation
impl Clone for Orientation
source§fn clone(&self) -> Orientation
fn clone(&self) -> Orientation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more