diff --git a/dbus/src/error.rs b/dbus/src/error.rs index f125e92..5f45098 100644 --- a/dbus/src/error.rs +++ b/dbus/src/error.rs @@ -4,6 +4,12 @@ use std::{ptr, fmt}; use crate::{arg, to_c_str, c_str_to_slice, init_dbus, Message}; use crate::strings::ErrorName; use std::error::Error as stdError; +use std::result::Result as stdResult; + +/// Alias for a [`Result`](stdResult) containing [`dbus::Error`](Error) by default. +/// +/// Can still be used with different error types. +pub type Result = stdResult; /// D-Bus Error wrapper. /// diff --git a/dbus/src/lib.rs b/dbus/src/lib.rs index 968cf9d..92fc51a 100644 --- a/dbus/src/lib.rs +++ b/dbus/src/lib.rs @@ -29,7 +29,7 @@ pub mod message; pub mod ffidisp; mod error; -pub use error::{Error, MethodErr}; +pub use error::{Error, MethodErr, Result}; pub mod channel;