/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use nsstring::{nsACString, nsCString}; use std::error::Error; use std::fmt;
/// The type of errors in gecko. Uses a newtype to provide additional type /// safety in Rust and #[repr(transparent)] to ensure the same representation /// as the C++ equivalent. #[repr(transparent)] #[allow(non_camel_case_types)] #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)] pubstruct nsresult(pub u32);
/// Get a printable name for the nsresult error code. This function returns /// a nsCString<'static>, which implements `Display`. pubfn error_name(self) -> nsCString { letmut cstr = nsCString::new(); unsafe {
Gecko_GetErrorName(self, &mut *cstr);
}
cstr
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.