[][src]Struct dbus_launch::Launcher

pub struct Launcher { /* fields omitted */ }

A D-Bus daemon launcher.

Implementations

impl Launcher[src]

pub fn new(daemon_type: DaemonType) -> Launcher[src]

Returns a new launcher for given type of D-Bus daemon.

pub fn daemon() -> Launcher[src]

Returns a new launcher for dbus-daemon.

pub fn broker() -> Launcher[src]

Returns a new launcher for dbus-broker.

pub fn bus_type(&mut self, bus_type: BusType) -> &mut Self[src]

The well-known type of the message bus.

pub fn listen(&mut self, listen: &str) -> &mut Self[src]

Listen on an additional address.

By default daemon will listen on a Unix domain socket in a temporary directory.

Examples

let mut launcher = dbus_launch::Launcher::daemon();
launcher.listen("tcp:host=localhost");
launcher.listen("unix:abstract=");

pub fn allow_anonymous(&mut self) -> &mut Self[src]

Authorize connections using anonymous mechanism.

This option has no practical effect unless the anonymous mechanism is also enabled.

pub fn auth(&mut self, auth: Auth) -> &mut Self[src]

Allow authorization mechanism.

By default all known mechanisms are allowed.

Examples

let mut launcher = dbus_launch::Launcher::daemon();
launcher.auth(dbus_launch::Auth::External);

pub fn service_dir<P: AsRef<Path>>(&mut self, path: P) -> &mut Self[src]

Adds a directory to search for .service files.

pub fn service<P: AsRef<Path>>(&mut self, name: &str, exec: P) -> &mut Self[src]

Adds a service file with given name and executable path.

pub fn launch(&self) -> Result<Daemon>[src]

Starts the dbus-daemon process.

Trait Implementations

impl Clone for Launcher[src]

impl Debug for Launcher[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> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,