[−][src]Struct ev3dev_lang_rust::Led
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
Auto Trait Implementations
impl !RefUnwindSafe for Led[src]
impl !Send for Led[src]
impl !Sync for Led[src]
impl Unpin for Led[src]
impl !UnwindSafe for Led[src]
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> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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>,