Struct dbus::nonblock::SyncConnection[][src]

pub struct SyncConnection { /* fields omitted */ }

A connection to D-Bus, Send + Sync + async version

Implementations

impl SyncConnection[src]

pub fn unique_name(&self) -> BusName<'_>[src]

Get the connection's unique name.

It's usually something like ":1.54"

pub async fn request_name<'a, N: Into<BusName<'a>>>(
    &self,
    name: N,
    allow_replacement: bool,
    replace_existing: bool,
    do_not_queue: bool
) -> Result<RequestNameReply, Error>
[src]

Request a name on the D-Bus.

For detailed information on the flags and return values, see the libdbus documentation.

pub async fn release_name<'a, N: Into<BusName<'a>>>(
    &self,
    name: N
) -> Result<ReleaseNameReply, Error>
[src]

Release a previously requested name on the D-Bus.

pub async fn add_match(
    &self,
    match_rule: MatchRule<'static>
) -> Result<MsgMatch, Error>
[src]

Adds a new match to the connection, and sets up a callback when this message arrives.

The returned value can be used to remove the match.

pub async fn add_match_no_cb(&self, match_str: &str) -> Result<(), Error>[src]

Adds a new match to the connection, without setting up a callback when this message arrives.

pub async fn remove_match_no_cb(&self, match_str: &str) -> Result<(), Error>[src]

Removes a match from the connection, without removing any callbacks.

pub async fn remove_match(&self, id: Token) -> Result<(), Error>[src]

Removes a previously added match and callback from the connection.

Trait Implementations

impl AsRef<Channel> for SyncConnection[src]

impl From<Channel> for SyncConnection[src]

impl MatchingReceiver for SyncConnection[src]

type F = Box<dyn FnMut(Message, &SyncConnection) -> bool + Send + 'static>

Type of callback

impl NonblockReply for SyncConnection[src]

type F = Box<dyn FnOnce(Message, &SyncConnection) + Send + 'static>

Callback type

impl Process for SyncConnection[src]

impl Sender for SyncConnection[src]

Auto Trait Implementations

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, 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.