[][src]Struct my_iot::measurement::Measurement

pub struct Measurement {
    pub sensor: String,
    pub value: Value,
    pub timestamp: DateTime<Local>,
}

A sensor measurement.

Fields

sensor: String

A sensor. For example: buienradar::6240::wind_speed_bft.

value: Value

An attached typed value.

timestamp: DateTime<Local>

Timestamp when the value was actually measured.

Methods

impl Measurement[src]

pub fn new(
    sensor: String,
    value: Value,
    timestamp: Option<DateTime<Local>>
) -> Self
[src]

Create a new measurement.

Trait Implementations

impl<'_, '_> From<&'_ Row<'_>> for Measurement[src]

impl Debug for Measurement[src]

Auto Trait Implementations

impl Send for Measurement

impl Sync for Measurement

Blanket Implementations

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

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

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.

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

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

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

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,