diff --git a/src/lib.rs b/src/lib.rs index 5e0ae84..643d2eb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,9 +3,12 @@ mod ext; use ext::*; +// Internal modules mod object; mod formats; +// TODO: External modules/functions/types/whatever + #[cfg(test)] mod tests { #[test] diff --git a/src/object.rs b/src/object.rs index bfe96e1..642bf64 100644 --- a/src/object.rs +++ b/src/object.rs @@ -1,4 +1,5 @@ use super::*; +use std::io; use smallbox::{ SmallBox, space, @@ -7,9 +8,10 @@ use smallbox::{ type OwnedObjectStackSize = space::S4; -/// An object that can be expose serialise+deserialise methods -pub trait Object{ - // TODO +/// An object that can be expose serialise+deserialise methods polymorphically. +pub trait Object { + fn to_writer(&self, to: &mut dyn io::Write) -> io::Result; + fn from_reader(&mut self, from: &mut dyn io::Read) -> io::Result; //ugh, this SUUUCKS... } /// A polymorphic `Object` that is owned.