Struct libnotcurses_sys::NcError
source · pub struct NcError {
pub int: NcResult_i32,
pub msg: String,
}
Expand description
The error type for the Rust methods API.
Fields§
§int: NcResult_i32
§msg: String
Implementations§
source§impl NcError
impl NcError
§Methods
sourcepub fn new() -> Self
pub fn new() -> Self
New NcError with default NCRESULT_ERR
error number, and no message.
sourcepub fn new_err(int: NcResult_i32) -> Self
pub fn new_err(int: NcResult_i32) -> Self
New NcError with custom error number, and without message.
sourcepub fn new_msg(msg: &str) -> Self
pub fn new_msg(msg: &str) -> Self
New NcError with default NCRESULT_ERR
error number and a custom message.
sourcepub fn with_msg(int: NcResult_i32, msg: &str) -> Self
pub fn with_msg(int: NcResult_i32, msg: &str) -> Self
New NcError with both a custom error number and a custom message.
Trait Implementations§
source§impl Error for NcError
impl Error for NcError
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
Auto Trait Implementations§
impl RefUnwindSafe for NcError
impl Send for NcError
impl Sync for NcError
impl Unpin for NcError
impl UnwindSafe for NcError
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