mod fast_real; mod pretty; mod standard; //mod deterministic; use super::{Write, Result}; pub use self::fast_real::*; pub use self::pretty::*; pub use self::standard::*; //pub use self::deterministic::*; pub trait WriteReal { fn write_real(w: &mut W, i: T) -> Result<()>; } pub trait RealFormat: WriteReal + WriteReal + WriteReal + WriteReal + WriteReal + WriteReal + WriteReal + WriteReal + WriteReal + WriteReal {} pub trait FormatEngine: Default { fn mark_delim(&mut self, _d: u8) {} } impl FormatEngine for () {} pub trait Format { type Engine: FormatEngine; type RealFormat: RealFormat; #[inline] fn write(_e: &mut Self::Engine, w: &mut Write, bytes: &[u8]) -> Result<()> { // Passthrough w.write(bytes)?; Ok(()) } }