use super::*; use smallbox::{ SmallBox, space, smallbox, }; type OwnedObjectStackSize = space::S4; /// An object that can be expose serialise+deserialise methods pub trait Object{ // TODO } /// A polymorphic `Object` that is owned. pub type OwnedObject<'a> = SmallBox; pub trait ObjectExt<'a>: Sized { fn into_owned(self) -> OwnedObject<'a>; } impl<'a, T: 'a> ObjectExt<'a> for T where T: Object { #[inline] fn into_owned(self) -> OwnedObject<'a> { smallbox!(self) } }