protocol::implement_composite_type [] [src]

macro_rules! implement_composite_type {
    ($ty:ident { $( $field_name:ident ),+ }) => { ... };
}

Implements Type for some struct.

This is used to enable serialization of fields for arbitrary structs.

pub struct Foo { a: u8, b: u16 };

implement_composite_type!(Foo { a, b });