[][src]Module parse_zoneinfo::structure

Determining the structure of a set of ruleset names.

The names of time zones in the zoneinfo database are of the form Area/Location, or more rarely, Area/Location/Sublocation. This means they form a hierarchy, with each level either serving as a time zone itself (usually a location) or as a parent of multiple other entries (usually an area).

When generating Rust code containing the timezone data, we need to generate the entire tree structure, not just the leaves of actual timezone data. This module determines that structure, allowing it to be created before any actual timezone data is written.

For example, say we have the following subset of time zone entries:

  • America/Antigua
  • America/Araguaina
  • America/Argentina/Buenos_Aires
  • America/Argentina/Catamarca
  • America/Argentina/Cordoba
  • America/Aruba

On top of the six actual time zone files, we would need to create the following:

  • An America module that has three private submodules (Antigua, Araguaína, and Aruba) and one public submodule (Argentina);
  • An America/Argentina submodule that has there private submodules (Buenos Aires, Catamarca, Cordoba).

This module contains an iterator that finds all parent zonesets, and sorts them so they’re output in a correct order.

Structs

Iter

Iterator over sorted entries in a TableStructure.

TableStructure

The structure of a set of time zone names.

TableStructureEntry

An entry returned from a TableStructure iterator.

Enums

Child

A child module that needs to be created.

Traits

Structure

Trait to put the structure method on Tables.