pub enum PluginError {
CommandFailed(String),
InvalidArg {
arg: String,
message: String,
},
ArgOutOfRange {
arg: String,
value: i64,
min: i64,
max: i64,
},
IpcConnection {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
DaemonNotRunning {
source: Option<Box<dyn Error + Send + Sync>>,
},
Io(Error),
Json(Error),
Other(String),
}Expand description
Plugin-specific errors
Variants§
CommandFailed(String)
InvalidArg
ArgOutOfRange
IpcConnection
DaemonNotRunning
Io(Error)
Json(Error)
Other(String)
Implementations§
Source§impl PluginError
impl PluginError
Sourcepub fn invalid_arg(arg: impl Into<String>, message: impl Into<String>) -> Self
pub fn invalid_arg(arg: impl Into<String>, message: impl Into<String>) -> Self
Create an invalid argument error
Sourcepub fn arg_out_of_range(
arg: impl Into<String>,
value: i64,
min: i64,
max: i64,
) -> Self
pub fn arg_out_of_range( arg: impl Into<String>, value: i64, min: i64, max: i64, ) -> Self
Create an argument out of range error
Sourcepub fn ipc_connection(message: impl Into<String>) -> Self
pub fn ipc_connection(message: impl Into<String>) -> Self
Create an IPC connection error
Sourcepub fn ipc_connection_with_source(
message: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn ipc_connection_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Create an IPC connection error with source
Sourcepub fn daemon_not_running() -> Self
pub fn daemon_not_running() -> Self
Create a daemon not running error
Sourcepub fn daemon_not_running_with_source(
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn daemon_not_running_with_source( source: impl Error + Send + Sync + 'static, ) -> Self
Create a daemon not running error with source
Trait Implementations§
Source§impl Debug for PluginError
impl Debug for PluginError
Source§impl Display for PluginError
impl Display for PluginError
Source§impl Error for PluginError
impl Error for PluginError
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<Error> for PluginError
impl From<Error> for PluginError
Auto Trait Implementations§
impl Freeze for PluginError
impl !RefUnwindSafe for PluginError
impl Send for PluginError
impl Sync for PluginError
impl Unpin for PluginError
impl !UnwindSafe for PluginError
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