pub struct PlatoEngineBuilder { /* private fields */ }Expand description
Builder for PlatoEngine.
Implementations§
Source§impl PlatoEngineBuilder
impl PlatoEngineBuilder
pub fn new() -> Self
Sourcepub fn sensor(self, name: impl Into<String>, callback: SensorFn) -> Self
pub fn sensor(self, name: impl Into<String>, callback: SensorFn) -> Self
Add a sensor with a callback.
Sourcepub fn actuator(self, name: impl Into<String>, callback: ActuatorFn) -> Self
pub fn actuator(self, name: impl Into<String>, callback: ActuatorFn) -> Self
Add an actuator with a callback.
Sourcepub fn alarm(
self,
name: impl Into<String>,
condition: AlarmCondition,
cooldown_ticks: u64,
) -> Self
pub fn alarm( self, name: impl Into<String>, condition: AlarmCondition, cooldown_ticks: u64, ) -> Self
Add an alarm rule.
Sourcepub fn history_capacity(self, capacity: usize) -> Self
pub fn history_capacity(self, capacity: usize) -> Self
Set history buffer capacity.
Sourcepub fn build(self) -> PlatoEngine
pub fn build(self) -> PlatoEngine
Build the engine.
Trait Implementations§
Source§impl Default for PlatoEngineBuilder
impl Default for PlatoEngineBuilder
Source§fn default() -> PlatoEngineBuilder
fn default() -> PlatoEngineBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PlatoEngineBuilder
impl !UnwindSafe for PlatoEngineBuilder
impl Freeze for PlatoEngineBuilder
impl Send for PlatoEngineBuilder
impl Sync for PlatoEngineBuilder
impl Unpin for PlatoEngineBuilder
impl UnsafeUnpin for PlatoEngineBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more