Struct zbus::ConnectionBuilder [−][src]
pub struct ConnectionBuilder<'a> { /* fields omitted */ }
Expand description
A builder for zbus::Connection
.
Implementations
Create a builder for connection that will use the given D-Bus bus address.
Create a builder for connection that will use the given unix stream.
Create a builder for connection that will use the given socket.
The to-be-created connection will be a peer-to-peer connection.
Note: When using zbus::ObjectServer
with a p2p connection, you must explicitly start
the dispatch process by calling zbus::ObjectServer::start_dispatch
.
The to-be-created connection will a be server using the given GUID.
The to-be-created connection will wait for incoming client authentication handshake and negotiation messages, for peer-to-peer communications after successful creation.
Set the max number of messages to queue.
Since typically you’d want to set this at instantiation time, you can set it through the builder.
Example
let conn = ConnectionBuilder::session()?
.max_queued(30)
.build()
.await?;
assert_eq!(conn.max_queued(), 30);
// Do something useful with `conn`..
Enable or disable the internal executor thread.
The thread is enabled by default.
See Connection::executor for more details.
Build the connection, consuming the builder.
Errors
Until server-side bus connection is supported, attempting to build such a connection will
result in Error::Unsupported
error.