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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.