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::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 | pub mod connection; |
20 | pub use connection::Connection; |
21 | |
22 | mod message_iterator; |
23 | pub use message_iterator::*; |
24 | pub mod object_server; |
25 | pub use object_server::ObjectServer; |
26 | pub mod proxy; |
27 | pub use proxy::Proxy; |
28 | |
29 | #[deprecated (since = "4.0.0" , note = "Use `proxy::Builder` instead" )] |
30 | #[doc (hidden)] |
31 | pub use proxy::Builder as ProxyBuilder; |
32 | #[deprecated (since = "4.0.0" , note = "Use `proxy::OwnerChangedIterator` instead" )] |
33 | #[doc (hidden)] |
34 | pub use proxy::OwnerChangedIterator; |
35 | #[deprecated (since = "4.0.0" , note = "Use `proxy::PropertyChanged` instead" )] |
36 | #[doc (hidden)] |
37 | pub use proxy::PropertyChanged; |
38 | #[deprecated (since = "4.0.0" , note = "Use `proxy::PropertyIterator` instead" )] |
39 | #[doc (hidden)] |
40 | pub use proxy::PropertyIterator; |
41 | #[deprecated (since = "4.0.0" , note = "Use `proxy::SignalIterator` instead" )] |
42 | #[doc (hidden)] |
43 | pub use proxy::SignalIterator; |
44 | |
45 | #[deprecated (since = "4.0.0" , note = "Use `object_server::InterfaceRef` instead" )] |
46 | #[doc (hidden)] |
47 | pub use object_server::InterfaceRef; |
48 | |
49 | #[deprecated (since = "4.0.0" , note = "Use `connection::Builder` instead" )] |
50 | #[doc (hidden)] |
51 | pub use connection::Builder as ConnectionBuilder; |
52 | |
53 | pub mod fdo; |
54 | |