1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
mod database;
mod error;
mod mode;
mod serialized;
pub use self::database::{BlockDatabase, Database, DatabaseRef, StreamingDatabase, VectoredDatabase};
pub use self::error::Error;
pub use self::mode::{Block, Mode, Streaming, Vectored};
pub use self::serialized::Serialized;
#[cfg(test)]
pub mod tests {
pub use super::database::tests::*;
}
use std::ffi::CStr;
use crate::ffi;
pub fn version() -> semver::Version {
semver::Version::parse(version_str().to_string_lossy().split(' ').next().unwrap()).unwrap()
}
pub fn version_str() -> &'static CStr {
unsafe { CStr::from_ptr(ffi::hs_version()) }
}