[][src]Trait binjs::io::bytes::float::WriteVarFloat

pub trait WriteVarFloat {
    fn write_maybe_varfloat(
        &mut self,
        value: Option<f64>
    ) -> Result<usize, Error>;
fn write_varfloat(&mut self, num: f64) -> Result<usize, Error>; fn write_maybe_varfloat2(
        &mut self,
        value: Option<F64>
    ) -> Result<usize, Error> { ... }
fn write_varfloat2(&mut self, num: F64) -> Result<usize, Error> { ... } }

Utility for manipulating of varfloats, a somewhat optimized representation of floats.

This format is designed to help the most common floating point numbers (fairly short integers) take fewer bytes.

Instead of always fitting in 64 bits, varfloats are represented as follows:

Required methods

fn write_maybe_varfloat(&mut self, value: Option<f64>) -> Result<usize, Error>

fn write_varfloat(&mut self, num: f64) -> Result<usize, Error>

Loading content...

Provided methods

fn write_maybe_varfloat2(&mut self, value: Option<F64>) -> Result<usize, Error>

Utility: as write_maybe_varfloat but with a F64 instead of a f64.

fn write_varfloat2(&mut self, num: F64) -> Result<usize, Error>

Utility: as write_varfloat but with a F64 instead of a f64.

Loading content...

Implementors

impl<T> WriteVarFloat for T where
    T: Write
[src]

Loading content...