Struct fxbox_thinkerbell::ast::Statement [] [src]

pub struct Statement<Ctx> where Ctx: Context {
    pub destination: Vec<SetSelector>,
    pub value: Value,
    pub kind: ChannelKind,
    pub phantom: Phantom<Ctx>,
}

Stuff to actually do. In practice, this means placing calls to devices.

Fields

destination

The set of outputs to which to send a command. Note that the set of outputs may change (e.g. when devices are added/removed) without rebooting the script.

value

Data to send to the resource. During compilation, we check that the type of value is compatible with that of destination.

kind

The kind of channel expected from destination, e.g. "close the door", "set the temperature", etc. During compilation, we make sure that we restrict to the elements of destination that offer kind.

phantom

Trait Implementations

impl<Ctx: Deserialize> Deserialize for Statement<Ctx> where Ctx: Context

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

impl<Ctx: Serialize> Serialize for Statement<Ctx> where Ctx: Context

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