pub struct PluginError { /* private fields */ }Expand description
Plugin-side error type. Carries a canonical ErrorCode plus a
human-readable message for logging; only the code crosses the FFI.
Implementations§
Source§impl PluginError
impl PluginError
Sourcepub fn new(code: ErrorCode, message: impl Into<String>) -> Self
pub fn new(code: ErrorCode, message: impl Into<String>) -> Self
Construct a new error with the given code and message.
Sourcepub fn msg(message: impl Into<String>) -> Self
pub fn msg(message: impl Into<String>) -> Self
Shorthand for a generic error with no specific code.
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
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()
Auto Trait Implementations§
impl Freeze for PluginError
impl RefUnwindSafe for PluginError
impl Send for PluginError
impl Sync for PluginError
impl Unpin for PluginError
impl UnsafeUnpin 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