Enum foxbox_taxonomy::values::Type [] [src]

pub enum Type {
    Unit,
    OnOff,
    OpenClosed,
    Duration,
    TimeStamp,
    ThinkerbellRule,
    Temperature,
    String,
    Color,
    Json,
    Binary,
    ExtBool,
    ExtNumeric,
}

The type of values manipulated by endpoints.

Variants

Unit

Trivial values

An empty value. Used for instance to inform that a countdown has reached 0 or that a device is ready.

OnOff

Boolean values

A boolean on/off state. Used for various two-states switches.

OpenClosed

A boolean open/closed state. Used for instance for doors, windows, etc.

Duration

Time

A duration. Used for instance in countdowns.

TimeStamp

A precise timestamp. Used for instance to determine when an event has taken place.

ThinkerbellRule
Temperature
String
Color

...

Json
Binary
ExtBool
ExtNumeric

Methods

impl Type

fn supports_eq(&self) -> bool

Determine whether using Range::Eq for this type is appropriate. Typically, using Range::Eq for a floating point number is a bad idea.

fn ensure_eq(&self, other: &Self) -> Result<(), TypeError>

Trait Implementations

impl Deserialize for Type

fn deserialize<__D>(deserializer: &mut __D) -> Result<Type, __D::Error> where __D: Deserializer

impl Serialize for Type

fn serialize<__S>(&self, serializer: &mut __S) -> Result<(), __S::Error> where __S: Serializer

impl Parser<Type> for Type

fn description() -> String

fn parse(path: Path, source: &mut JSON) -> Result<Self, ParseError>

fn from_str(source: &str) -> Result<T, ParseError>

fn take(path: Path, source: &mut JSON, field_name: &str) -> Result<T, ParseError>

fn take_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<T, ParseError>>

fn take_vec_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<Vec<T>, ParseError>>

fn take_vec(path: Path, source: &mut JSON, field_name: &str) -> Result<Vec<T>, ParseError>

impl ToJSON for Type

fn to_json(&self, parts: &mut BinaryParts) -> JSON

Derived Implementations

impl Ord for Type

fn cmp(&self, __arg_0: &Type) -> Ordering

impl Eq for Type

impl PartialOrd for Type

fn partial_cmp(&self, __arg_0: &Type) -> Option<Ordering>

fn lt(&self, __arg_0: &Type) -> bool

fn le(&self, __arg_0: &Type) -> bool

fn gt(&self, __arg_0: &Type) -> bool

fn ge(&self, __arg_0: &Type) -> bool

impl PartialEq for Type

fn eq(&self, __arg_0: &Type) -> bool

fn ne(&self, __arg_0: &Type) -> bool

impl Clone for Type

fn clone(&self) -> Type

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

impl Debug for Type

fn fmt(&self, __arg_0: &mut Formatter) -> Result