1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Types for the various [D-Bus bus names][dbn].
//!
//! D-Bus has several kinds of names — unique connection names, well-known service names,
//! interface names, error names, member names and property names — and each kind has its own
//! syntax rules. This module provides a type per kind: a name is validated once, when it is
//! created, and is then known to be valid everywhere it travels.
//!
//! Each type has an owned counterpart ([`OwnedBusName`], [`OwnedInterfaceName`] and so on) for
//! when the borrowed form is inconvenient, and all of them implement [`Type`] and convert to
//! and from [`Variant`], so they can be sent over the bus directly.
//!
//! Validation failures are reported as [`crate::Error::InvalidName`], and conversions between
//! two name kinds that cannot succeed as [`crate::Error::InvalidNameConversion`].
//!
//! # Example
//!
//! ```
//! use zbus::names::InterfaceName;
//!
//! let name = InterfaceName::try_from("org.freedesktop.DBus").unwrap();
//! assert_eq!(name, "org.freedesktop.DBus");
//!
//! // An interface name needs at least two elements separated by a dot.
//! InterfaceName::try_from("no-dots").unwrap_err();
//! ```
//!
//! [dbn]: https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names
//! [`Type`]: trait@crate::Type
//! [`Variant`]: enum@crate::Variant
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
/// Deprecated alias of [`crate::Error`].
pub type Error = crateError;
/// Deprecated alias of [`crate::Result`].
pub type Result<T> = crateResult;