pub(crate) async fn subscribe(
        sub_tx: &mut mpsc::Sender<SubscriptionReq>, path: dbus::Path<'static>, child_objects: bool,
    ) -> Result<mpsc::UnboundedReceiver<Event>> {
        let (tx, rx) = mpsc::unbounded();
        let (ready_tx, ready_rx) = oneshot::channel();
        sub_tx
            .send(SubscriptionReq { path, child_objects, tx, ready_tx })
            .await
            .map_err(|_| Error::new(ErrorKind::Internal(InternalErrorKind::DBusConnectionLost)))?;
        ready_rx.await.map_err(|_| Error::new(ErrorKind::Internal(InternalErrorKind::DBusConnectionLost)))?;
        Ok(rx)
    }
/// Subscribe to D-Bus events for specified path.
///
/// If `child_objects` is [true] events about *direct* child objects being added and removed
/// will also be delivered.
Subscribe to D-Bus events for specified path.
If `child_objects` is [true] events about *direct* child objects being added and removed
will also be delivered.
Subscribe to D - Bus events for specified path . If ` child_objects ` is [ true ] events about * direct * child objects being added and removed will also be delivered .
pub(crate) async fn subscribe(
        sub_tx: &mut mpsc::Sender<SubscriptionReq>, path: dbus::Path<'static>, child_objects: bool,
    ) -> Result<mpsc::UnboundedReceiver<Event>> {
        let (tx, rx) = mpsc::unbounded();
        let (ready_tx, ready_rx) = oneshot::channel();
        sub_tx
            .send(SubscriptionReq { path, child_objects, tx, ready_tx })
            .await
            .map_err(|_| Error::new(ErrorKind::Internal(InternalErrorKind::DBusConnectionLost)))?;
        ready_rx.await.map_err(|_| Error::new(ErrorKind::Internal(InternalErrorKind::DBusConnectionLost)))?;
        Ok(rx)
    }
pub ( crate ) async fn subscribe ( sub_tx : & mut mpsc :: Sender < SubscriptionReq > , path : dbus :: Path < ' static > , child_objects : bool , ) -> Result < mpsc :: UnboundedReceiver < Event > > { let ( tx , rx ) = mpsc :: unbounded ( ) ; let ( ready_tx , ready_rx ) = oneshot :: channel ( ) ; sub_tx . send ( SubscriptionReq { path , child_objects , tx , ready_tx } ) . await . map_err ( | _ | Error :: new ( ErrorKind :: Internal ( InternalErrorKind :: DBusConnectionLost ) ) ) ? ; ready_rx . await . map_err ( | _ | Error :: new ( ErrorKind :: Internal ( InternalErrorKind :: DBusConnectionLost ) ) ) ? ; Ok ( rx ) }
Subscribe to D-Bus events for specified path.
Subscribe to D - Bus events for specified path .
sub_tx
&mut mpsc::Sender<SubscriptionReq>
path
dbus::Path<'static>
child_objects
bool
sub_tx
&mut mpsc::Sender<SubscriptionReq>
path
dbus::Path<'static>
child_objects
bool