|
|
|
@ -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
|
|
|
|
|
/// An object that can be expose serialise+deserialise methods polymorphically.
|
|
|
|
|
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.
|
|
|
|
|