[][src]Struct mynewt::hw::sensor::SensorValue

pub struct SensorValue<'a> {
    pub key: &'a Strn<'a>,
    pub value: SensorValueType,
    pub geo: SensorValueType,
}

Represents a decoded sensor data value. Since temperature may be integer (raw) or float (computed), we use the struct to return both integer and float values.

Fields

key: &'a Strn<'a>

Null-terminated string for the key. t for raw temp, tmp for computed. When transmitted to CoAP Server or Collector Node, the key (field name) to be used.

value: SensorValueType

The type of the sensor value and the value.

geo: SensorValueType

Geolocation associated with the sensor value.

Trait Implementations

impl<'a> Clone for SensorValue<'a>[src]

impl<'a> Copy for SensorValue<'a>[src]

impl<'a> Default for SensorValue<'a>[src]

Default sensor value is None

Auto Trait Implementations

impl<'a> Send for SensorValue<'a>

impl<'a> Sync for SensorValue<'a>

impl<'a> Unpin for SensorValue<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.