[][src]Struct dbus::blocking::Connection

pub struct Connection { /* fields omitted */ }

A connection to D-Bus, thread local + non-async version

Methods

impl Connection[src]

pub fn new_session() -> Result<Self, Error>[src]

Create a new connection to the session bus.

pub fn new_system() -> Result<Self, Error>[src]

Create a new connection to the system-wide bus.

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

Get the connection's unique name.

It's usually something like ":1.54"

pub fn process(&mut self, timeout: Duration) -> Result<bool, Error>[src]

Tries to handle an incoming message if there is one. If there isn't one, it will wait up to timeout

pub fn with_proxy<'a, 'b, D: Into<BusName<'a>>, P: Into<Path<'a>>>(
    &'b self,
    dest: D,
    path: P,
    timeout: Duration
) -> Proxy<'a, &'b Connection>
[src]

Create a convenience struct for easier calling of many methods on the same destination and path.

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

Release a previously requested name on the D-Bus.

Trait Implementations

impl Sender for Connection[src]

impl MatchingReceiver for Connection[src]

type F = Box<dyn FnMut(Message, &Connection) -> bool>

Type of callback

impl BlockingSender for Connection[src]

Auto Trait Implementations

Blanket Implementations

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.

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

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

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