Lightspeed

Trait Lightspeed 

Source
pub trait Lightspeed {
    // Required methods
    fn sync_state(&mut self);
    fn update_property<T>(
        &mut self,
        prop_name: &str,
        val: T,
    ) -> Result<(), LightspeedError>;
}

Required Methods§

Source

fn sync_state(&mut self)

This method is used to synchronize the device state with the internal state of the driver.

Source

fn update_property<T>( &mut self, prop_name: &str, val: T, ) -> Result<(), LightspeedError>

Method to be used when receving requests from clients to update properties.

The internal logic would be a match on the prop_name that will then call prop.update_int(…), a method to update the value on the device itself, or both of them depending on the type of device.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§