pub enum NativeError {
Unsupported,
Denied(String),
Cancelled,
Invalid(String),
Os(String),
}Expand description
Why a native call did not do what was asked.
Variants§
Unsupported
Not available on this platform, in this build, or in this process (for example notifications from an unbundled macOS binary). Callers treat it as “skip the feature”.
Denied(String)
The OS or the user refused (keychain locked, permission not granted).
Cancelled
The user dismissed a dialog.
Invalid(String)
The caller passed something unusable (an invalid accelerator, a URL with a forbidden scheme).
Os(String)
The OS reported a failure; the text is one line and safe to show.
Implementations§
Source§impl NativeError
impl NativeError
pub fn is_unsupported(&self) -> bool
Trait Implementations§
Source§impl Clone for NativeError
impl Clone for NativeError
Source§impl Debug for NativeError
impl Debug for NativeError
Source§impl Display for NativeError
impl Display for NativeError
impl Eq for NativeError
Source§impl Error for NativeError
impl Error for NativeError
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 PartialEq for NativeError
impl PartialEq for NativeError
impl StructuralPartialEq for NativeError
Auto Trait Implementations§
impl Freeze for NativeError
impl RefUnwindSafe for NativeError
impl Send for NativeError
impl Sync for NativeError
impl Unpin for NativeError
impl UnsafeUnpin for NativeError
impl UnwindSafe for NativeError
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