1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Asynchronous [`AsyncRead`] / [`AsyncWrite`] interfaces.
use Future;
use crateError;
/// Generic asynchronous read trait similar to [`std::io::Read`].
///
/// The instances of [`AsyncRead`] are required to construct [`AsyncReceiver`] that can read
/// MavLink frames.
///
/// Instead of relying on a particular definition of read trait, we allow users to use any library
/// with I/O capabilities.
///
/// Wrappers are available for specific I/O implementations:
///
/// - [`TokioReader`] for [`tokio::io::AsyncRead`]
/// - [`EmbeddedIoAsyncReader`] for [`embedded_io_async::Read`]
///
/// [`AsyncReceiver`]: crate::io::AsyncReceiver
/// [`TokioReader`]: crate::io::TokioReader
/// [`EmbeddedIoAsyncReader`]: crate::io::EmbeddedIoAsyncReader
/// Generic asynchronous write trait similar to [`std::io::Write`].
///
/// The instances of [`AsyncWrite`] are required to construct [`AsyncSender`] that can write
/// MavLink frames.
///
/// Instead of relying on a particular definition of write trait, we allow users to use any library
/// with I/O capabilities.
///
/// Wrappers are available for specific I/O implementations:
///
/// - [`TokioWriter`] for [`tokio::io::AsyncWrite`]
/// - [`EmbeddedIoAsyncWriter`] for [`embedded_io_async::Write`]
///
/// [`AsyncSender`]: crate::io::AsyncSender
/// [`TokioWriter`]: crate::io::TokioWriter
/// [`EmbeddedIoAsyncWriter`]: crate::io::EmbeddedIoAsyncWriter