Module example

Module example 

Source
Expand description

Demonstrates the generated code.

This module serves two purposes. First is to host the generated code on docs.rs so that the output can be demonstrated. Second is to contain all the crate’s unit tests. Viewing the source of this module demonstrates all the features that exist, but see also the crate-level docs which contains a worked example.

Structs§

ExampleMapDynamic
This typemap provides the dynamic section.
ExampleMapDynamicCell
Exposed only so that it is possible to name iterator types.
ExampleMapFixed
A typemap demonstrating the most basic functionality: it’s fixed, and has no iterable traits.
Filesystem
Contains a path on the filesystem.
IterationExampleMap
A typemap supporting iteration by a couple different traits.
IterationExampleMapCell
Exposed only so that it is possible to name iterator types.
Metrics
a HashMap of metrics.
Time
Contains a time as u64 seconds.

Traits§

IntegralId
For demonstration purposes, a trait which represents things containing integral ids.

Functions§

build_initial_metrics
Builds a hashmap containing some example metrics.