1 macro_rules! impl_writeable {
2 ($st:ident, {$($field:ident),*}) => {
3 impl<W: Writer> Writeable<W> for $st {
4 fn write(&self, w: &mut W) -> Result<(), DecodeError> {
5 $( self.$field.write(w)?; )*
10 impl<R: Read> Readable<R> for $st {
11 fn read(r: &mut R) -> Result<Self, DecodeError> {
13 $($field: Readable::read(r)?),*