Struct cconst::CopyConsts
[−]
[src]
pub struct CopyConsts(_);
Manage build.rs
constructed constants
Methods
impl CopyConsts
[src]
fn new() -> CopyConsts
Create new set of compile time functions
fn add_const<T: Copy>(&mut self, fname: &str, typename: &str, val: &T)
Add constant
Adds a value to be stored as a compile time constant, with an internal
name of fname
.
typename
is required to output generated code, but not checked. For
this reason using the add_const!
macro instead of this function
should be preferred.
fn write_code(&self) -> Result<()>
Write out code for compile-time constant generation.