gz_transport/
lib.rs

1#![doc = include_str!("../README.md")]
2#![warn(
3    missing_docs,
4    missing_debug_implementations,
5    clippy::all,
6    clippy::nursery
7)]
8
9
10#[cfg(any(
11    all(feature = "fortress", feature = "garden"),
12    all(feature = "fortress", feature = "harmonic"),
13    all(feature = "fortress", feature = "ionic"),
14    all(feature = "garden", feature = "harmonic"),
15    all(feature = "garden", feature = "ionic"),
16    all(feature = "harmonic", feature = "ionic"),
17))]
18compile_error!(
19    "Only one of the following features can be enabled: fortress, garden, harmonic, ionic"
20);
21
22mod node;
23mod publisher;
24mod string;
25
26pub use node::Node;
27pub use publisher::Publisher;
28
29/// Block the current thread until a SIGINT or SIGTERM is received.
30///
31/// # Example
32///
33/// ```no_run
34/// gz_transport::wait_for_shutdown();
35/// ```
36pub fn wait_for_shutdown() {
37    unsafe { gz_transport_sys::waitForShutdown() };
38}