pub struct MethodErr(/* private fields */);Expand description
A D-Bus Method Error, containing an error name and a description.
Unlike the “Error” struct, this is a Rust native struct.
Implementations§
Source§impl MethodErr
impl MethodErr
Sourcepub fn invalid_arg<T>(a: &T) -> MethodErr
pub fn invalid_arg<T>(a: &T) -> MethodErr
Create an Invalid Args MethodErr.
Sourcepub fn failed<T>(a: &T) -> MethodErr
pub fn failed<T>(a: &T) -> MethodErr
Create a MethodErr that the method failed in the way specified.
Sourcepub fn no_interface<T>(a: &T) -> MethodErr
pub fn no_interface<T>(a: &T) -> MethodErr
Create a MethodErr that the Interface was unknown.
Sourcepub fn no_property<T>(a: &T) -> MethodErr
pub fn no_property<T>(a: &T) -> MethodErr
Create a MethodErr that the Property was unknown.
Sourcepub fn ro_property<T>(a: &T) -> MethodErr
pub fn ro_property<T>(a: &T) -> MethodErr
Create a MethodErr that the Property was read-only.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Description accessor
Sourcepub fn to_message(&self, msg: &Message) -> Message
pub fn to_message(&self, msg: &Message) -> Message
Creates an error reply from a method call message.
Note: You normally don’t need to use this function, as it is called internally from Tree::handle.
Trait Implementations§
Source§impl Error for MethodErr
impl Error for MethodErr
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<TypeMismatchError> for MethodErr
impl From<TypeMismatchError> for MethodErr
Source§fn from(t: TypeMismatchError) -> MethodErr
fn from(t: TypeMismatchError) -> MethodErr
Converts to this type from the input type.
Source§impl Ord for MethodErr
impl Ord for MethodErr
Source§impl PartialOrd for MethodErr
impl PartialOrd for MethodErr
impl Eq for MethodErr
impl StructuralPartialEq for MethodErr
Auto Trait Implementations§
impl Freeze for MethodErr
impl RefUnwindSafe for MethodErr
impl Send for MethodErr
impl Sync for MethodErr
impl Unpin for MethodErr
impl UnwindSafe for MethodErr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more