pub trait DBusError {
// Required methods
fn create_reply(&self, msg: &MessageHeader<'_>) -> Result<Message>;
fn name(&self) -> ErrorName<'_>;
fn description(&self) -> Option<&str>;
}
Expand description
A trait that needs to be implemented by error types to be returned from D-Bus methods.
Typically, you’d use the crate::fdo::Error
since that covers quite a lot of failures but
occasionally you might find yourself needing to use a custom error type. You’ll need to
implement this trait for your error type. The easiest way to achieve that is to make use of the
DBusError
macro.
Required Methods§
sourcefn create_reply(&self, msg: &MessageHeader<'_>) -> Result<Message>
fn create_reply(&self, msg: &MessageHeader<'_>) -> Result<Message>
Generate an error reply message for the given method call.