Object skel

master
Avril 3 years ago
parent f884590641
commit 8493506cf8
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -3,9 +3,12 @@
mod ext; use ext::*; mod ext; use ext::*;
// Internal modules
mod object; mod object;
mod formats; mod formats;
// TODO: External modules/functions/types/whatever
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
#[test] #[test]

@ -1,4 +1,5 @@
use super::*; use super::*;
use std::io;
use smallbox::{ use smallbox::{
SmallBox, SmallBox,
space, space,
@ -7,9 +8,10 @@ use smallbox::{
type OwnedObjectStackSize = space::S4; type OwnedObjectStackSize = space::S4;
/// An object that can be expose serialise+deserialise methods /// An object that can be expose serialise+deserialise methods polymorphically.
pub trait Object{ pub trait Object {
// TODO fn to_writer(&self, to: &mut dyn io::Write) -> io::Result<usize>;
fn from_reader(&mut self, from: &mut dyn io::Read) -> io::Result<usize>; //ugh, this SUUUCKS...
} }
/// A polymorphic `Object` that is owned. /// A polymorphic `Object` that is owned.

Loading…
Cancel
Save