qubit_common/lib.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026.
4 * Haixing Hu, Qubit Co. Ltd.
5 *
6 * All rights reserved.
7 *
8 ******************************************************************************/
9//! # Qubit Common - Core Utility Library
10//!
11//! Provides language-level fundamental tools and data type support, including:
12//! - Data type definitions and validation
13//! - Argument validation and error handling
14//! - Core utility functions
15//!
16//! # Author
17//!
18//! Haixing Hu
19
20pub mod lang;
21pub mod util;
22
23// Re-export main types from lang module
24pub use lang::{
25 argument::{
26 // Core functions
27 check_argument,
28 // Condition functions
29 check_argument_fmt,
30 check_argument_with_message,
31 check_bounds,
32 check_element_index,
33 check_position_index,
34 check_position_indexes,
35 check_state,
36 check_state_with_message,
37 // Collection functions
38 require_element_non_null,
39 // Numeric functions
40 require_equal,
41 require_not_equal,
42 // Option functions
43 require_null_or,
44 ArgumentError,
45 ArgumentResult,
46 CollectionArgument,
47 NumericArgument,
48 OptionArgument,
49 // String functions
50 StringArgument,
51 },
52 box_error::{
53 BoxError,
54 BoxResult,
55 },
56 data_type::{
57 DataType,
58 DataTypeOf,
59 },
60};
61
62// Re-export utility types
63pub use util::{
64 Pair,
65 Triple,
66};