#[repr(i32)]pub enum CompassMode {
Dynamic = 0,
FixedRing = 1,
FreezeHeading = 2,
}Variants§
Dynamic = 0
Compass with dynamic ring and heading
FixedRing = 1
Compass with fixed ring and heading
FreezeHeading = 2
Compass with heading and freeze option
Implementations§
Source§impl CompassMode
impl CompassMode
Source§impl CompassMode
impl CompassMode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for CompassMode
impl Clone for CompassMode
Source§fn clone(&self) -> CompassMode
fn clone(&self) -> CompassMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompassMode
impl Debug for CompassMode
Source§impl Default for CompassMode
impl Default for CompassMode
Source§fn default() -> CompassMode
fn default() -> CompassMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CompassMode
impl<'de> Deserialize<'de> for CompassMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CompassMode> for i32
impl From<CompassMode> for i32
Source§fn from(value: CompassMode) -> i32
fn from(value: CompassMode) -> i32
Converts to this type from the input type.
Source§impl Hash for CompassMode
impl Hash for CompassMode
Source§impl IntoEnumIterator for CompassMode
impl IntoEnumIterator for CompassMode
type Iterator = CompassModeIter
fn iter() -> CompassModeIter ⓘ
Source§impl Ord for CompassMode
impl Ord for CompassMode
Source§fn cmp(&self, other: &CompassMode) -> Ordering
fn cmp(&self, other: &CompassMode) -> Ordering
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
Source§impl PartialEq for CompassMode
impl PartialEq for CompassMode
Source§fn eq(&self, other: &CompassMode) -> bool
fn eq(&self, other: &CompassMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for CompassMode
impl PartialOrd for CompassMode
Source§impl Serialize for CompassMode
impl Serialize for CompassMode
Source§impl TryFrom<i32> for CompassMode
impl TryFrom<i32> for CompassMode
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<CompassMode, UnknownEnumValue>
fn try_from(value: i32) -> Result<CompassMode, UnknownEnumValue>
Performs the conversion.
impl Copy for CompassMode
impl Eq for CompassMode
impl StructuralPartialEq for CompassMode
Auto Trait Implementations§
impl Freeze for CompassMode
impl RefUnwindSafe for CompassMode
impl Send for CompassMode
impl Sync for CompassMode
impl Unpin for CompassMode
impl UnsafeUnpin for CompassMode
impl UnwindSafe for CompassMode
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