pub trait Bake {
    fn bake(&self, ctx: &CrateEnv) -> TokenStream;
Expand description

The Bake trait allows a piece of data to write itself into a Rust expression.

This can be used to generate files with hardcoded data.

Required methods

Returns a TokenStream that would evaluate to self.

Crates that are required for the evaluation of the TokenStream will be added to ctx.

Implementations on Foreign Types