Skip to main content

vortex_dtype/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4#![cfg(target_endian = "little")]
5#![deny(missing_docs)]
6
7//! A type system for Vortex
8//!
9//! This crate contains the core logical type system for Vortex, including the definition of data types,
10//! and (optionally) logic for their serialization and deserialization.
11
12#[cfg(feature = "arbitrary")]
13mod arbitrary;
14pub mod arrow;
15mod bigint;
16pub mod datetime;
17mod decimal;
18mod dtype;
19pub mod extension;
20mod f16;
21mod field;
22mod field_mask;
23mod field_names;
24mod native_dtype;
25mod nullability;
26mod ptype;
27pub mod serde;
28pub mod session;
29mod struct_;
30
31pub use bigint::*;
32pub use decimal::*;
33pub use dtype::DType;
34pub use dtype::NativeDType;
35pub use extension::ExtDType;
36pub use extension::ExtDTypeRef;
37pub use extension::ExtID;
38pub use f16::*;
39pub use field::*;
40pub use field_mask::*;
41pub use field_names::*;
42pub use half;
43pub use nullability::*;
44pub use ptype::*;
45pub use struct_::*;
46
47pub mod proto {
48    //! Protocol buffer representations for DTypes
49    //!
50    //! This module contains the code to serialize and deserialize DTypes to and from protocol buffers.
51
52    pub use vortex_proto::dtype;
53}
54
55pub mod flatbuffers {
56    //! Flatbuffer representations for DTypes
57    //!
58    //! This module contains the code to serialize and deserialize DTypes to and from flatbuffers.
59
60    pub use vortex_flatbuffers::dtype::*;
61}
62
63#[cfg(test)]
64mod test {
65    use std::sync::LazyLock;
66
67    use vortex_session::VortexSession;
68
69    use crate::session::DTypeSession;
70
71    pub(crate) static SESSION: LazyLock<VortexSession> =
72        LazyLock::new(|| VortexSession::empty().with::<DTypeSession>());
73}