[][src]Enum my_iot::value::Value

pub enum Value {
    Counter(u64),
    Size(u64),
    Text(String),
    Celsius(f64),
    Bft(u32),
    WindDirection(PointOfTheCompass),
    Metres(f64),
    Rh(f64),
    ImageUrl(String),
}

Sensor reading value.

Variants

Counter(u64)

Generic counter.

Size(u64)

Size in bytes.

Text(String)

Plain text.

Celsius(f64)

Celsius temperature.

Bft(u32)

Beaufort wind speed.

WindDirection(PointOfTheCompass)

Wind direction.

Metres(f64)

Length in metres.

Rh(f64)

Relative humidity in percents.

ImageUrl(String)

Image URL.

Methods

impl Value[src]

pub fn class(&self) -> &str[src]

pub fn icon(&self) -> Result<&'static str, Error>[src]

Get Font Awesome icon tag.

pub fn is_inline(&self) -> bool[src]

Get whether value could be rendered inline.

Trait Implementations

impl Clone for Value[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Value> for Value[src]

impl Display for Value[src]

impl Debug for Value[src]

impl Serialize for Value[src]

impl<'de> Deserialize<'de> for Value[src]

fn deserialize_in_place<D>(
    deserializer: D,
    place: &mut Self
) -> Result<(), <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
[src]

Deserializes a value into self from the given Deserializer. Read more

impl ToSql for Value[src]

Serializes value to JSON.

impl FromSql for Value[src]

De-serializes value from JSON.

impl Render for Value[src]

fn render(&self, f: &mut Formatter) -> Result[src]

Render value in HTML.

fn is_none(&self) -> bool

Auto Trait Implementations

impl Unpin for Value

impl Send for Value

impl Sync for Value

impl UnwindSafe for Value

impl RefUnwindSafe for Value

Blanket Implementations

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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>,