embassy/docs/modules/ROOT/pages/traits.adoc

9 lines
422 B
Text
Raw Normal View History

2021-12-09 09:06:17 +00:00
= Embassy Traits
2021-12-09 09:40:26 +00:00
Embassy provides a set of traits and types specifically designed for `async` usage.
* `embassy::io`: `AsyncBufRead`, `AsyncWrite`. Traits for byte-stream IO, essentially `no_std` compatible versions of `futures::io`.
* `embassy::traits::flash`: Flash device trait.
* `embassy::time`: `Clock` and `Alarm` traits. Std-like `Duration` and `Instant`.
* More traits for SPI, I2C, UART async HAL coming soon.