Struct ev3dev_lang_rust::Led [−][src]
pub struct Led { /* fields omitted */ }The leds on top of the EV3 brick.
Implementations
impl Led[src]
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
Auto Trait Implementations
impl RefUnwindSafe for Led
impl RefUnwindSafe for Ledimpl UnwindSafe for Led
impl UnwindSafe for Led