We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72f12cf commit f583724Copy full SHA for f583724
src/leds.rs
@@ -22,6 +22,9 @@ pub enum Direction
22
}
23
24
impl Direction {
25
+ /// Provides an iterator starting with North
26
+ /// and moving clockwise around the compass
27
+ /// e.g. N -> NE -> E, etc.
28
pub fn iter() -> Iter<'static, Direction> {
29
static DIRECTIONS: [Direction; 8] = [
30
Direction::North,
@@ -128,6 +131,9 @@ impl Leds {
128
131
129
132
130
133
134
+ /// Provides a mutable iterator for iterating over the on board leds.
135
+ /// Starts at ld3 (N) and moves clockwise.
136
+ /// Stops once it has iterated through all 8 leds.
137
pub fn iter_mut(&mut self) -> LedsMutIterator {
138
LedsMutIterator::new(self)
139
0 commit comments