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