Skip to main content

mk_field_proj

Macro mk_field_proj 

Source
macro_rules! mk_field_proj {
    (struct $name:ident($src_ty:ident.$field:ident: $tgt_ty:ty)) => { ... };
}
Expand description

Make a unit struct that represents the projection to a particular struct field. Only works for sized types.

Syntax: mk_field_proj!(struct FooAProj(Foo.a: A)).