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 evalutate to self.

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

Implementations on Foreign Types

Implementors