[−][src]Struct lrl_test_compiler::environment::drivers::Drivers
Represents the drivers data within a drivers TOML file.
Fields
version: String
Drivers Version
sensor: Vec<VirtualSensorDriver>
Vector of drivers for virtual sensors
relay: Vec<VirtualRelayDriver>
Vector of drivers for virtual relays
Implementations
impl Drivers
[src]
pub fn parse(
file_id: usize,
file_name: String,
contents: &str
) -> CompilerResult<DriversFile>
[src]
file_id: usize,
file_name: String,
contents: &str
) -> CompilerResult<DriversFile>
Parse the provided file_name as a Drivers.toml file. Outputs a DriversFile struct wrapped in a CompilerResult.
pub fn get_sensor_driver_index(&self, driver_name: &str) -> Option<u16>
[src]
Return the index into the drivers table for the given sensor driver name
pub fn get_sensor_driver(
&self,
driver_name: &str
) -> Option<&VirtualSensorDriver>
[src]
&self,
driver_name: &str
) -> Option<&VirtualSensorDriver>
Return a reference to the sensor driver with the given sensor driver name
pub fn get_relay_driver_index(&self, driver_name: &str) -> Option<u16>
[src]
Return the index into the drivers table for the given relay driver name
pub fn get_relay_driver(&self, driver_name: &str) -> Option<&VirtualRelayDriver>
[src]
Return a reference to the relay driver with the given relay driver name
Trait Implementations
impl Debug for Drivers
[src]
impl<'de> Deserialize<'de> for Drivers
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<Drivers> for Drivers
[src]
impl StructuralPartialEq for Drivers
[src]
Auto Trait Implementations
impl RefUnwindSafe for Drivers
impl Send for Drivers
impl Sync for Drivers
impl Unpin for Drivers
impl UnwindSafe for Drivers
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
Dst: LosslessTryFrom<Src>,
pub fn lossless_try_into(self) -> Option<Dst>
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
Dst: LossyFrom<Src>,
pub fn lossy_into(self) -> Dst
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,