Skip to main content

CodeTable

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§

const HAS_UNIT: bool

Whether any entry in the entire table defines a unit.

This includes all disciplines and parameter categories, independently of the current code or context. When true, code_unit may still return None for an individual lookup. When false, it always returns None.

Required Methods§

fn code_description(&self, context: &C) -> Option<&'static str>

Returns the description for the code number.

fn code_unit(&self, context: &C) -> Option<&'static str>

Returns the textual representation of the defined unit.

Provided Methods§

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

Implementors§

Source§

impl CodeTable<Grib2Context> for ParamCategory

Source§

const HAS_UNIT: bool = false

Source§

impl CodeTable<ParameterContext> for ParamNum

Source§

const HAS_UNIT: bool = true

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for BiFourierSubtruncationType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for BitMapIndicator

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for CalendarType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for CentreId

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for ComplexPackingMissingValueManagement

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for CompressionType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for DataRepresentationTemplateNum

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for DerivedForecastType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for Discipline

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for EarthShapeType

Source§

const HAS_UNIT: bool = true

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for EnsembleForecastType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for FixedSurfaceType

Source§

const HAS_UNIT: bool = true

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for FloatPrecision

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for GeneratingProcessType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for GridDefinitionTemplateNum

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for GroupSplittingMethod

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for IdentificationTemplateNum

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for LocalTableVer

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for MasterTableVer

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for MatrixCoordinateParam

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for MatrixCoordinateValueFuncDefinition

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for OriginalFieldValueType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for PointListInterpretation

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for ProbabilityForecastType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for ProcessedDataType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for ProductDefinitionTemplateNum

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for ProductionStatus

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for RefTimeSignificance

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for SpatialDifferencingOrder

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for StatisticalProcessType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for TimeIncrementType

Source§

const HAS_UNIT: bool = false

Source§

impl<__DumpContext: ?Sized> CodeTable<__DumpContext> for TimeRangeUnit

Source§

const HAS_UNIT: bool = false