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::*;
// Internal modules
mod object;
mod formats;
// TODO: External modules/functions/types/whatever
#[cfg(test)]
mod tests {
#[test]

@ -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<usize>;
fn from_reader(&mut self, from: &mut dyn io::Read) -> io::Result<usize>; //ugh, this SUUUCKS...
}
/// A polymorphic `Object` that is owned.

Loading…
Cancel
Save