Struct rustc_errors::registry::Registry
source · Fields
long_descriptions: FxHashMap<&'static str, Option<&'static str>>
Implementations
sourceimpl Registry
impl Registry
pub fn new(
long_descriptions: &[(&'static str, Option<&'static str>)]
) -> Registry
sourcepub fn try_find_description(
&self,
code: &str
) -> Result<Option<&'static str>, InvalidErrorCode>
pub fn try_find_description(
&self,
code: &str
) -> Result<Option<&'static str>, InvalidErrorCode>
Returns InvalidErrorCode
if the code requested does not exist in the
registry. Otherwise, returns an Option
where None
means the error
code is valid but has no extended information.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnwindSafe for Registry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes