Enum bme280_multibus::Standby
source · [−]#[repr(u8)]
pub enum Standby {
Micros500,
Micros62500,
Millis125,
Millis250,
Millis500,
Millis1000,
Millis10,
Millis20,
}Expand description
tstandby settings.
Variants
Micros500
0.5 ms
Micros62500
62.5 ms
Millis125
125 ms
Millis250
250 ms
Millis500
500 ms
Millis1000
1000 ms
Millis10
10 ms
Millis20
20 ms
Implementations
sourceimpl Standby
impl Standby
sourcepub const fn duration(&self) -> Duration
pub const fn duration(&self) -> Duration
Convert the standby enumeration to a duration.
Example
use bme280_multibus::Standby;
use core::time::Duration;
assert_eq!(Standby::Micros500.duration(), Duration::from_micros(500));
assert_eq!(
Standby::Micros62500.duration(),
Duration::from_micros(62500)
);
assert_eq!(Standby::Millis125.duration(), Duration::from_millis(125));
assert_eq!(Standby::Millis250.duration(), Duration::from_millis(250));
assert_eq!(Standby::Millis500.duration(), Duration::from_millis(500));
assert_eq!(Standby::Millis1000.duration(), Duration::from_millis(1000));
assert_eq!(Standby::Millis10.duration(), Duration::from_millis(10));
assert_eq!(Standby::Millis20.duration(), Duration::from_millis(20));Trait Implementations
sourceimpl Ord for Standby
impl Ord for Standby
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Standby> for Standby
impl PartialOrd<Standby> for Standby
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for Standby
impl Eq for Standby
impl StructuralEq for Standby
impl StructuralPartialEq for Standby
Auto Trait Implementations
impl RefUnwindSafe for Standby
impl Send for Standby
impl Sync for Standby
impl Unpin for Standby
impl UnwindSafe for Standby
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more