Enum foxbox_taxonomy::api::Error [] [src]

pub enum Error {
    GetterDoesNotSupportPolling(Id<Getter>),
    GetterDoesNotSupportWatching(Id<Getter>),
    GetterRequiresThresholdForWatching(Id<Getter>),
    TypeError(TypeError),
    RangeError(Range),
    InvalidValue(Value),
    InternalError(InternalError),
}

An error that arose during interaction with either a device, an adapter or the adapter manager

Variants

GetterDoesNotSupportPolling

Attempting to fetch a value from a Channel that doesn't support this operation.

GetterDoesNotSupportWatching

Attempting to watch a value from a Channel that doesn't support this operation.

GetterRequiresThresholdForWatching

Attempting to watch all values from a Channel that requires a filter. For instance, some Channel may be updated 60 times per second. Attempting to watch all values could easily exceed the capacity of the network or exhaust the battery. In such a case, the adapter should return this error.

TypeError

Attempting to send a value with a wrong type.

RangeError

Attempting to use an inconsistent range. For instance, one with min > max.

InvalidValue

Attempting to send an invalid value. For instance, a time of day larger than 24h.

InternalError

An error internal to the foxbox or an adapter. Normally, these errors should never arise from the high-level API.

Trait Implementations

impl Serialize for Error

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

impl Deserialize for Error

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

impl ToJSON for Error

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

impl Display for Error

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

impl Error for Error

fn description(&self) -> &str

fn cause(&self) -> Option<&Error>

Derived Implementations

impl Clone for Error

fn clone(&self) -> Error

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

impl Debug for Error

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