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
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