binbuf/
lib.rs

1
2#![feature(min_specialization)]
3#![feature(generic_const_exprs)]
4
5pub extern crate macros;
6pub use macros as macros_reexp;
7
8macro_with_crate_path! { macros::derive_fixed; fixed }
9macro_with_crate_path! { macros::derive_fixed_buf; fixed_buf }
10macro_with_crate_path! { macros::derive_dynamic; dynamic }
11macro_with_crate_path! { macros::derive_dynamic_buf; dynamic_buf }
12
13use macros::macro_with_crate_path;
14pub use fixed::Instance as Fixed;
15pub use dynamic::Instance as Dynamic;
16pub use bytes_ptr::{Instance as BytesPtr, Const as BytesPtrConst, Mut as BytesPtrMut};
17pub use entry::{Instance as Entry, Buf, BufConst, BufMut, buf_to_const};
18
19pub mod entry;
20pub mod bytes_ptr;
21pub mod fixed;
22pub mod dynamic;
23pub mod impls;
24mod private;
25mod utils;
26mod tests;
27
28// fn benchmark<R>(msg: &'static str, f: impl FnOnce() -> R) -> R {
29//     let start = std::time::Instant::now();
30//     let r = f();
31//     let elapsed = start.elapsed().as_millis();
32//     println!("{}: {} ms.", msg, elapsed);
33//     r
34// }