1pub type HashMap<K, V> = std::collections::HashMap<K, V, ahash::RandomState>;
2pub type HashMapValues<'a, K, V> = std::collections::hash_map::Values<'a, K, V>;
3pub type HashSet<T> = std::collections::HashSet<T, ahash::RandomState>;
4pub type HashSetIter<'a, T> = std::collections::hash_set::Iter<'a, T>;
5
6use std::fmt::{Debug, Formatter};
7use uuid::Uuid;
8
9mod property_path;
10pub use property_path::PropertyPath;
11
12mod schema;
13pub use schema::*;
14
15mod schema_def;
16pub use schema_def::*;
17
18mod schema_cache;
19
20mod error;
21pub use error::{DataSetError, DataSetErrorWithBacktrace, DataSetResult};
22
23pub use schema_cache::CachedSchemaNamedType;
24pub use schema_cache::SchemaCacheSingleFile;
25
26#[derive(Copy, Clone, PartialEq, Eq, Hash)]
27pub struct SchemaFingerprint(u128);
28impl SchemaFingerprint {
29 pub fn as_uuid(&self) -> Uuid {
30 Uuid::from_u128(self.0)
31 }
32
33 pub fn from_uuid(uuid: Uuid) -> SchemaFingerprint {
34 SchemaFingerprint(uuid.as_u128())
35 }
36}
37
38impl Debug for SchemaFingerprint {
39 fn fmt(
40 &self,
41 f: &mut Formatter<'_>,
42 ) -> std::fmt::Result {
43 f.debug_tuple("SchemaFingerprint")
44 .field(&Uuid::from_u128(self.0))
45 .finish()
46 }
47}