2024-02-01 14:27:31 +01:00
|
|
|
use std::collections::BTreeMap;
|
2024-01-26 20:14:27 +01:00
|
|
|
use std::rc::Rc;
|
|
|
|
|
2024-01-26 18:45:12 +01:00
|
|
|
// We only use our own error type; no need for From conversions provided by the
|
|
|
|
// standard library's try! macro. This reduces lines of LLVM IR by 4%.
|
|
|
|
macro_rules! tri {
|
|
|
|
($e:expr $(,)?) => {
|
|
|
|
match $e {
|
|
|
|
core::result::Result::Ok(val) => val,
|
|
|
|
core::result::Result::Err(err) => return core::result::Result::Err(err),
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
mod value;
|
|
|
|
|
2024-01-30 19:24:00 +01:00
|
|
|
pub use value::JValue;
|
|
|
|
|
2024-02-01 14:27:31 +01:00
|
|
|
pub type Map<K, V> = BTreeMap<K, V>;
|
2024-01-29 17:13:17 +01:00
|
|
|
|
2024-01-30 19:24:00 +01:00
|
|
|
// it is memory- and CPU-wise more effective than a string
|
|
|
|
pub type JsonString = Rc<str>;
|