#[non_exhaustive]pub enum NotcursesError {
NcError(NcError),
IoError(Error),
Message(String),
}Expand description
The Notcurses error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NcError(NcError)
A libnotcurses-sys error.
IoError(Error)
An std::io::Error.
Message(String)
An error message string.
Implementations§
Source§impl NotcursesError
§Methods
impl NotcursesError
§Methods
Sourcepub fn msg<T>(string: &str) -> NotcursesResult<T>
pub fn msg<T>(string: &str) -> NotcursesResult<T>
Returns a NotcursesError::Message already wraped in a Result.
Trait Implementations§
Source§impl Debug for NotcursesError
impl Debug for NotcursesError
Source§impl Display for NotcursesError
impl Display for NotcursesError
Source§impl Error for NotcursesError
impl Error for NotcursesError
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 NotcursesError
impl !RefUnwindSafe for NotcursesError
impl Send for NotcursesError
impl Sync for NotcursesError
impl Unpin for NotcursesError
impl !UnwindSafe for NotcursesError
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