Struct foxbox_taxonomy::services::Channel [] [src]

pub struct Channel<IO> where IO: IOMechanism {
    pub tags: HashSet<Id<TagId>>,
    pub id: Id<IO>,
    pub service: Id<ServiceId>,
    pub mechanism: IO,
    pub adapter: Id<AdapterId>,
    pub last_seen: Option<TimeStamp>,
}

An channel represents a single place where data can enter or leave a device. Note that channels support either a single kind of getter or a single kind of setter. Devices that support both getters or setters, or several kinds of getters, or several kinds of setters, are represented as services containing several channels.

Fields

tags

Tags describing the channel.

These tags can be set by the user, adapters or applications. They are used to regroup channels for rules.

For instance "entrance".

id

An id unique to this channel.

service

The service owning this channel.

mechanism

The update mechanism for this channel.

adapter

Identifier of the adapter for this channel.

last_seen

The last time the device was seen.

Trait Implementations

impl<IO: Deserialize> Deserialize for Channel<IO> where IO: IOMechanism

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

impl<IO: Serialize> Serialize for Channel<IO> where IO: IOMechanism

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

impl ToJSON for Channel<Getter>

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

impl ToJSON for Channel<Setter>

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

impl<IO> Eq for Channel<IO> where IO: IOMechanism

impl<IO> PartialEq for Channel<IO> where IO: IOMechanism

fn eq(&self, other: &Self) -> bool

1.0.0fn ne(&self, other: &Rhs) -> bool

impl<IO> Hash for Channel<IO> where IO: IOMechanism

fn hash<H>(&self, state: &mut H) where H: Hasher

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

Derived Implementations

impl<IO: Clone> Clone for Channel<IO> where IO: IOMechanism

fn clone(&self) -> Channel<IO>

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

impl<IO: Debug> Debug for Channel<IO> where IO: IOMechanism

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