Enum foxbox_taxonomy::api::WatchEvent [] [src]

pub enum WatchEvent {
    EnterRange {
        from: Id<Getter>,
        value: Value,
    },
    ExitRange {
        from: Id<Getter>,
        value: Value,
    },
    GetterRemoved(Id<Getter>),
    GetterAdded(Id<Getter>),
    InitializationError {
        channel: Id<Getter>,
        error: Error,
    },
}

An event during watching.

Variants

EnterRange

If a range was specified when we registered for watching, EnterRange is fired whenever we enter this range. If Always was specified, EnterRange is fired whenever a new value is available. Otherwise, never fired.

Fields

from

The channel that sent the value.

value

The actual value.

ExitRange

If a range was specified when we registered for watching, ExitRange is fired whenever we exit this range. Otherwise, never fired.

Fields

from

The channel that sent the value.

value

The actual value.

GetterRemoved

The set of devices being watched has changed, typically either because a tag was edited or because a device was removed. Payload is the id of the device that was removed.

GetterAdded

The set of devices being watched has changed, typically either because a tag was edited or because a device was added. Payload is the id of the device that was added.

InitializationError

One of the channels encountered an error during initialization. This channel will not be watched, but other channels will remain watched.

Fields

channel
error

Trait Implementations

impl Serialize for WatchEvent

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

Derived Implementations

impl Clone for WatchEvent

fn clone(&self) -> WatchEvent

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

impl Debug for WatchEvent

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