Trait CodeTable
pub trait CodeTable<C = ()>where
C: ?Sized,{
const HAS_UNIT: bool;
// Required methods
fn code_description(&self, context: &C) -> Option<&'static str>;
fn code_unit(&self, context: &C) -> Option<&'static str>;
// Provided method
fn code_is_missing(&self, _context: &C) -> bool { ... }
}Expand description
Resolves a code using external information supplied by the caller.
Use &() for context-independent lookups.
Required Associated Constants§
Required Methods§
fn code_description(&self, context: &C) -> Option<&'static str>
fn code_description(&self, context: &C) -> Option<&'static str>
Returns the description for the code number.
Provided Methods§
fn code_is_missing(&self, _context: &C) -> bool
fn code_is_missing(&self, _context: &C) -> bool
Whether this code is explicitly defined as missing by the table.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".