Files
tantivy/src/common/mod.rs
Paul Masurel 1a08ca4f95 Doc
2016-09-22 15:45:37 +09:00

27 lines
506 B
Rust

mod serialize;
mod timer;
mod vint;
pub use self::serialize::BinarySerializable;
pub use self::timer::Timing;
pub use self::timer::TimerTree;
pub use self::timer::OpenTimer;
pub use self::vint::VInt;
use std::io;
pub fn make_io_err(msg: String) -> io::Error {
io::Error::new(io::ErrorKind::Other, msg)
}
/// Has length trait
pub trait HasLen {
/// Return length
fn len(&self,) -> usize;
/// Returns true iff empty.
fn is_empty(&self,) -> bool {
self.len() == 0
}
}