[][src]Trait ev3dev_lang_rust::Findable

pub trait Findable<PortType> where
    Self: Sized,
    PortType: Port
{ fn list() -> Ev3Result<Vec<Self>>;
fn get(port: PortType) -> Ev3Result<Self>;
fn find() -> Ev3Result<Self>; }

Required methods

fn list() -> Ev3Result<Vec<Self>>

Extract list of connected 'Self'

fn get(port: PortType) -> Ev3Result<Self>

Try to get a Self on the given port. Returns None if port is not used or another device is connected.

fn find() -> Ev3Result<Self>

Try to find a Self. Only returns a motor if their is exactly one connected, Error::NotFound otherwise.

Loading content...

Implementors

impl Findable<MotorPort> for LargeMotor[src]

impl Findable<MotorPort> for MediumMotor[src]

impl Findable<SensorPort> for ColorSensor[src]

impl Findable<SensorPort> for GyroSensor[src]

impl Findable<SensorPort> for InfraredSensor[src]

impl Findable<SensorPort> for TouchSensor[src]

impl Findable<SensorPort> for UltrasonicSensor[src]

Loading content...