[−][src]Enum accelerometer::orientation::Orientation
Device orientation as computed from accelerometer data
Variants
Unable to determine the orientation from current data
Device is in portrait mode in whatever way is considered "up"
Device is in portrait mode in whatever way is considered "down"
Device is in landscape mode in whatever way is considered "up"
Device is in landscape mode in whatever way is considered "down"
Device is parallel to the ground, facing up
Device is parallel to the ground, facing down
Implementations
impl Orientation
[src]
pub fn is_flat(self) -> bool
[src]
Is this orientation considered to be flat?
pub fn is_landscape(self) -> bool
[src]
Is the device in a landscape orientation?
pub fn is_portrait(self) -> bool
[src]
Is the device in a portrait orientation?
Trait Implementations
impl Clone for Orientation
[src]
fn clone(&self) -> Orientation
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Orientation
[src]
impl Debug for Orientation
[src]
impl Eq for Orientation
[src]
impl PartialEq<Orientation> for Orientation
[src]
fn eq(&self, other: &Orientation) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Orientation
[src]
impl StructuralPartialEq for Orientation
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,