macro_rules! make_exportable_provider { ($provider:ty, [ $($(#[$cfg:meta])? $struct_m:ty),+, ]) => { ... }; }
Expand description
This macro can be used on a data provider to allow it to be used for data generation.
Data generation ‘compiles’ data by using this data provider (which usually translates data from
different sources and doesn’t have to be efficient) to generate data structs, and then writing
them to an efficient format like BlobDataProvider
or BakedDataProvider
. The requirements
for make_exportable_provider
are:
- The data struct has to implement
serde::Serialize
anddatabake::Bake
- The provider needs to implement
IterableDataProvider
for all specifiedKeyedDataMarker
s. This allows the generating code to know whichDataLocale
to collect.