Trait rusty_nail::dispenser::Dispenser
[−]
[src]
pub trait Dispenser { fn max_flow_rate(&self) -> f64; fn set_flow_rate(&mut self, rate: f64) -> Result<()>; fn set_level(&mut self, level: f64) -> Result<()>; fn remaining(&self) -> Result<f64>; fn dispense(&mut self, quantity: f64) -> Result<f64>; }
Defines trait for interfacing to a dispense
Required Methods
fn max_flow_rate(&self) -> f64
Returns the maximum flow rate of the pump in mL/s
fn set_flow_rate(&mut self, rate: f64) -> Result<()>
Sets the current flow rate of the pump in mL/s
fn set_level(&mut self, level: f64) -> Result<()>
Set the current liquid level in mL.
fn remaining(&self) -> Result<f64>
Get the current liquid level in mL.
fn dispense(&mut self, quantity: f64) -> Result<f64>
Dispense some quantity of liquid in mL.
Implementors
impl Dispenser for AdafruitPeristalticDispenser
impl Dispenser for TestDispenser