use futures_util::stream::TryStreamExt; use zbus::{Connection, MessageStream, Result}; use zvariant::{Type, Value}; #[tokio::main] async fn main() -> Result<()> { let connection = Connection::session().await?; connection .request_name("org.freedesktop.Notifications") // Requesting dbus for this service name .await?; // Process incoming notifs use futures_util::stream::TryStreamExt; let mut stream = zbus::MessageStream::from(&connection); // Convert the connection into a message stream while let Some(msg) = stream.try_next().await? { /// } Ok(()) }