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`] (or
6//! [`tokio::runtime::Runtime::block_on`]) to turn them into blocking calls.
7//!
8//! This module is only available when the `blocking-api` feature is enabled (default).
9//!
10//! # Caveats
11//!
12//! Since methods provided by these types run their own little runtime (`block_on`), you must not
13//! use them in async contexts because of the infamous [async sandwich footgun][asf]. This is
14//! an especially important fact to keep in mind for [`crate::interface`]. While `interface` allows
15//! non-async methods for convenience, these methods are called from an async context. The
16//! [`blocking` crate] provides an easy way around this problem though.
17//!
18//! [asf]: https://rust-lang.github.io/wg-async/vision/shiny_future/users_manual.html#caveat-beware-the-async-sandwich
19//! [`blocking` crate]: https://docs.rs/blocking/
20
21pub mod connection;
22pub use connection::Connection;
23
24mod message_iterator;
25pub use message_iterator::*;
26pub mod object_server;
27pub use object_server::ObjectServer;
28pub mod proxy;
29pub use proxy::Proxy;
30
31pub mod fdo;