pub enum Error {
DBusError(Error),
NoConnection,
IOError(Error),
JSONError(Error),
NotificationNotFound(u32),
ConnectionInitializedTwice,
}Expand description
Enum representing possible errors to happen during the usage of crate::NotificationService.
Variants§
DBusError(Error)
D-Bus error. Carries [zbus::Error] inside.
Usually returned if another notification daemon is running on the session bus.
NoConnection
Returned if attempted to call methods that involve D-Bus interaction and have not called
crate::NotificationService::run yet.
IOError(Error)
Returned in case of I/O file errors. Carries std::io::Error.
JSONError(Error)
Returned if JSON parsing of the notification history failed. Carries serde_json::Error.
Usually indicates that the JSON markup is corrupted.
NotificationNotFound(u32)
Returned if the notification with the given ID is not found.
ConnectionInitializedTwice
Returned if crate::NotificationService::run is called more than once.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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