Expand description
An asynchronous D-Bus implementation for the Tokio ecosystem.
So far this is a fairly low-level implementation, but is sufficient to write efficient servers without some of the flair associated with other clients (like proxies generated from xml).
To currently see how it’s used, see:
- examples/client.rs
- examples/server.rs
- examples/systray.rs,
a systray icon with a menu, implementing
org.kde.StatusNotifierItemandcom.canonical.dbusmenu. - examples/notification.rs,
sending a desktop notification through
org.freedesktop.Notifications.
Both of those have a counterpart which does the same thing through bindings
generated from an interface file by tokio-dbus-codegen, driven by
tokio-dbus-runtime:
examples/systray_codegen.rs
and
examples/notification_codegen.rs.
Modules§
- org_
freedesktop_ dbus - Types associated with the
org.freedesktop.DBusinterface. - ty
- Type
Markerfor writing to type-checked D-Bus bodies.
Structs§
- Body
- A read-only view into a buffer suitable for use as a body in a
Message. - BodyBuf
- A buffer that can be used to write a body.
- Buffers
- A collection of heap-allocated buffers for use in connections.
- Connection
- An asynchronous D-Bus client.
- Connection
Builder - Builder of a
Connection. - Endianness
- The endianness of a message.
- Error
- An error raised by this crate.
- Flags
- Flags inside of a D-Bus message.
- Load
Array - Read an array from a buffer.
- Message
- A borrowed D-Bus message.
- Message
Buf - An owned D-Bus message.
- Object
Path - A validated object path.
- Object
Path Buf - A validated owned object path.
- Object
Path Error - An error constructing an object path.
- Raw
- A writer for values whose shape is only known at runtime.
- RawArray
- A writer for the elements of an array whose shape is only known at runtime.
- RecvBuf
- Buffer used for receiving messages through D-Bus.
- SendBuf
- Buffer used for sending messages through D-Bus.
- Serial
- An opaque identifier for a serial.
- Signature
- A D-Bus signature.
- Signature
Buf - A D-Bus signature.
- Signature
Builder - A D-Bus signature builder.
- Signature
Error - Detailed errors raised when validation of a
Signaturefails. - Store
Array - Write a typed array.
- Store
Struct - Write a struct.
- Store
Variant - Write the contents of a variant.
Enums§
- Alignment
- The alignment of a D-Bus type, as a runtime value.
- Message
Kind - The kind of a D-Bus message.
- Variant
- A variant holding a value of a basic D-Bus type.
Traits§
- Arguments
- Types which can be conveniently used as arguments when extending buffers.
- AsBody
- Trait for types which can be cheaply coerced into a
Body. - Frame
- A verbatim frame that can be stored and loaded from a buffer.
- Read
- A type who’s reference can be read directly from a buffer.
- Storable
- Trait used for types which can be stored with a
store()call. - Write
- A type who’s reference can be written directly to a buffer.
- Write
Aligned - Trait for types which can be written to.
- Write
Unaligned - Trait for types which can be written unaligned to.