zbus/blocking/
mod.rs

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