Struct ev3dev_lang_rust::Driver [−][src]
pub struct Driver { /* fields omitted */ }Helper struct that manages attributes.
It creates an Attribute instance if it does not exists or uses a cached one.
Implementations
impl Driver[src]
impl Driver[src]pub fn new(class_name: &str, name: &str) -> Driver[src]
Returns a new Driver.
All attributes created by this driver will use the path /sys/class/{class_name}/{name}.
pub fn find_name_by_port_and_driver(
class_name: &str,
port: &dyn Port,
driver_name_vec: &[&str]
) -> Ev3Result<String>[src]
class_name: &str,
port: &dyn Port,
driver_name_vec: &[&str]
) -> Ev3Result<String>
Returns the name of the device with the given class_name, driver_name and at the given port.
Returns Ev3Error::NotFound if no such device exists.
pub fn find_name_by_driver(
class_name: &str,
driver_name_vec: &[&str]
) -> Ev3Result<String>[src]
class_name: &str,
driver_name_vec: &[&str]
) -> Ev3Result<String>
Returns the name of the device with the given class_name.
Returns Ev3Error::NotFound if no such device exists.
Returns Ev3Error::MultipleMatches if more then one matching device exists.
pub fn find_names_by_driver(
class_name: &str,
driver_name_vec: &[&str]
) -> Ev3Result<Vec<String>>[src]
class_name: &str,
driver_name_vec: &[&str]
) -> Ev3Result<Vec<String>>
Returns the names of the devices with the given class_name.
pub fn get_attribute(&self, attribute_name: &str) -> Attribute[src]
Return the Attribute wrapper for the given attribute_name.
Creates a new one if it does not exist.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Driver
impl !RefUnwindSafe for Driverimpl UnwindSafe for Driver
impl UnwindSafe for Driver