Trait nserror::NsresultExt
[−]
[src]
pub trait NsresultExt { fn failed(self) -> bool; fn succeeded(self) -> bool; fn to_result(self) -> Result<nsresult, nsresult>; fn error_name(self) -> nsCString; }
An extension trait which is intended to add methods to nsresult
types.
Unfortunately, due to ABI issues, this trait is implemented on all u32
types. These methods are meaningless on non-nsresult values.
Required Methods
fn failed(self) -> bool
fn succeeded(self) -> bool
fn to_result(self) -> Result<nsresult, nsresult>
fn error_name(self) -> nsCString
Get a printable name for the nsresult error code. This function returns
a nsCString<'static>, which implements Display
.
Implementors
impl NsresultExt for nsresult