Macro type_level_values::construct_val[][src]

macro_rules! construct_val {
    ($($all:tt)*) => { ... };
}

Constructs a ConstValue value,initializing every field.

Go to the documentation of the construct macro for more details on the syntax for this macro.

Example:Constructing a struct with only public fields.



#[derive(TypeLevel)]
#[typelevel(reexport(Struct))]
pub struct Rectangle{
    pub x:u32,
    pub y:u32,
    pub w:u32,
    pub h:u32,
}
use self::type_level_Rectangle::fields;

fn main(){

    let value=construct_val!{RectangleType=>
        fields::x=U0,
        fields::y=U0,
        fields::w=U0,
        fields::h=U0,
    };

}