}
// Vectors
-macro_rules! impl_for_vec {
+macro_rules! impl_writeable_for_vec {
($ty: ty $(, $name: ident)*) => {
impl<$($name : Writeable),*> Writeable for Vec<$ty> {
#[inline]
Ok(())
}
}
-
+ }
+}
+macro_rules! impl_readable_for_vec {
+ ($ty: ty $(, $name: ident)*) => {
impl<$($name : Readable),*> Readable for Vec<$ty> {
#[inline]
fn read<R: Read>(r: &mut R) -> Result<Self, DecodeError> {
}
}
}
+macro_rules! impl_for_vec {
+ ($ty: ty $(, $name: ident)*) => {
+ impl_writeable_for_vec!($ty $(, $name)*);
+ impl_readable_for_vec!($ty $(, $name)*);
+ }
+}
impl Writeable for Vec<u8> {
#[inline]