1 | //! The blocking API. |
2 | //! |
3 | //! This module hosts all our blocking API. All the types under this module are thin wrappers |
4 | //! around the corresponding asynchronous types. Most of the method calls are simply calling their |
5 | //! asynchronous counterparts on the underlying types and use [`async_io::block_on`] to turn them |
6 | //! into blocking calls. |
7 | //! |
8 | //! # Caveats |
9 | //! |
10 | //! Since methods provided by these types run their own little runtime (`block_on`), you must not |
11 | //! use them in async contexts because of the infamous [async sandwich footgun][asf]. This is |
12 | //! an especially important fact to keep in mind for [`crate::dbus_interface`]. While |
13 | //! `dbus_interface` allows non-async methods for convenience, these methods are called from an |
14 | //! async context. The [`blocking` crate] provides an easy way around this problem though. |
15 | //! |
16 | //! [asf]: https://rust-lang.github.io/wg-async/vision/shiny_future/users_manual.html#caveat-beware-the-async-sandwich |
17 | //! [`blocking` crate]: https://docs.rs/blocking/ |
18 | |
19 | mod connection; |
20 | pub use connection::*; |
21 | mod connection_builder; |
22 | pub use connection_builder::*; |
23 | mod message_iterator; |
24 | pub use message_iterator::*; |
25 | mod object_server; |
26 | pub use object_server::*; |
27 | mod proxy; |
28 | pub use proxy::*; |
29 | mod proxy_builder; |
30 | pub use proxy_builder::*; |
31 | pub mod fdo; |
32 | |