File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ pub struct White<C>(pub C);
23
23
pub type RGBW < ComponentType , WhiteComponentType = ComponentType > =
24
24
RGBA < ComponentType , White < WhiteComponentType > > ;
25
25
26
- /// A trait that smart led drivers implement
26
+ /// A trait that Smart Led Drivers implement
27
27
///
28
28
/// The amount of time each iteration of `iterator` might take is undefined.
29
29
/// Drivers, where this might lead to issues, aren't expected to work in all cases.
@@ -35,3 +35,20 @@ pub trait SmartLedsWrite {
35
35
T : IntoIterator < Item = I > ,
36
36
I : Into < Self :: Color > ;
37
37
}
38
+
39
+ pub mod asynch {
40
+ use core:: future:: Future ;
41
+
42
+ /// An async trait that Smart Led Drivers implement
43
+ ///
44
+ /// The amount of time each iteration of `iterator` might take is undefined.
45
+ /// Drivers, where this might lead to issues, aren't expected to work in all cases.
46
+ pub trait SmartLedsWrite {
47
+ type Error ;
48
+ type Color ;
49
+ fn write < T , I > ( & mut self , iterator : T ) -> impl Future < Output = Result < ( ) , Self :: Error > >
50
+ where
51
+ T : IntoIterator < Item = I > ,
52
+ I : Into < Self :: Color > ;
53
+ }
54
+ }
You can’t perform that action at this time.
0 commit comments