Struct ev3dev_lang_rust::Led[][src]

pub struct Led { /* fields omitted */ }

The leds on top of the EV3 brick.

Implementations

impl Led[src]

pub const COLOR_OFF: (u8, u8)[src]

Led off.

pub const COLOR_RED: (u8, u8)[src]

Led color red

pub const COLOR_GREEN: (u8, u8)[src]

Led color green.

pub const COLOR_AMBER: (u8, u8)[src]

Led color amber.

pub const COLOR_ORANGE: (u8, u8)[src]

Led color orange.

pub const COLOR_YELLOW: (u8, u8)[src]

LED color yellow.

pub fn new() -> Ev3Result<Led>[src]

Create a new instance of the Led struct.

pub fn get_left_color(&self) -> Ev3Result<(u8, u8)>[src]

Returns the current color value of the left led.

pub fn set_left_color(&self, color: (u8, u8)) -> Ev3Result<()>[src]

Sets the color value of the left led.

pub fn get_right_color(&self) -> Ev3Result<(u8, u8)>[src]

Returns the current color value of the right led.

pub fn set_right_color(&self, color: (u8, u8)) -> Ev3Result<()>[src]

Sets the color value of the right led.

pub fn get_color(&self) -> Ev3Result<Option<(u8, u8)>>[src]

Returns the color value of both leds or None if they are different.

pub fn set_color(&self, color: (u8, u8)) -> Ev3Result<()>[src]

Sets the color value of both leds.

Trait Implementations

impl Clone for Led[src]

impl Debug for Led[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.