[][src]Struct dbus_async::DBus

pub struct DBus { /* fields omitted */ }

This struct represents an object to communicate with the DBus daemon.

Implementations

impl DBus[src]

pub async fn session(introspectable: bool) -> IoResult<(DBus, JoinHandle<()>)>[src]

Connect to the session DBus.

pub async fn system(introspectable: bool) -> IoResult<(DBus, JoinHandle<()>)>[src]

Connect to the system DBus.

pub async fn new<'_>(
    path: &'_ str,
    introspectable: bool
) -> IoResult<(DBus, JoinHandle<()>)>
[src]

Create a DBus object. You can choose in the second argument that the Peer is introspectable.

pub fn send(&self, msg: Message) -> DBusResult<()>[src]

Send a Message without waiting for a response.

pub async fn call<'_>(&'_ self, msg: Message) -> DBusResult<Message>[src]

Send a Message with waiting for a response.

pub async fn call_reply_serial<'_>(
    &'_ self,
    msg: Message,
    msg_sender: MpscSender<Message>
) -> DBusResult<u32>
[src]

pub async fn register_name<'_, '_>(
    &'_ self,
    name: String,
    flags: &'_ DBusNameFlag
) -> DBusResult<Message>
[src]

Register a name for the peer. This calls the RequestName method from the DBus daemon.

pub fn add_object_path(
    &self,
    object_path: String,
    sender: MpscSender<Message>
) -> DBusResult<()>
[src]

Add a Handler to a specific path.

pub fn delete_object_path(&self, object_path: String) -> DBusResult<()>[src]

Delete a object by path.

pub fn delete_sender(&self, sender: MpscSender<Message>) -> DBusResult<()>[src]

Delete a object by sender.

pub fn add_interface(
    &self,
    interface: String,
    sender: MpscSender<Message>
) -> DBusResult<()>
[src]

Add an interface Handler.

pub fn add_signal_handler(
    &self,
    path: String,
    sender: MpscSender<Message>
) -> DBusResult<()>
[src]

Add a signal handler.

pub async fn list_path<'_, '_>(
    &'_ self,
    path: &'_ str
) -> DBusResult<HashSet<String>>
[src]

List all objects under a specific path.

pub fn close(&self) -> DBusResult<()>[src]

Close the DBus object.

pub fn get_socket_path(&self) -> &str[src]

The current path of the DBus socket.

Trait Implementations

impl Clone for DBus[src]

impl Debug for DBus[src]

Auto Trait Implementations

impl !RefUnwindSafe for DBus

impl Send for DBus

impl Sync for DBus

impl Unpin for DBus

impl !UnwindSafe for DBus

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.