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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// Copyright © 2022-2023 Mini Functions. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
//!
//! A Rust library for accessing a collection of mathematical and
//! cryptographic constants
//!
//! [](https://minifunctions.com/cmn)
//!
//! <center>
//!
//! [](https://www.rust-lang.org)
//! [](https://crates.io/crates/cmn)
//! [](https://lib.rs/crates/cmn)
//! [](https://github.com/sebastienrousseau/cmn)
//! [](http://opensource.org/licenses/MIT)
//!
//! </center>
//!
//! ## Overview
//!
//! Common (CMN), a Rust library designed for developers who are looking
//! for a comprehensive collection of mathematical and cryptographic
//! constants.
//!
//!`CMN` is a modern, fast, and user-friendly library that makes it easy
//! to access a wide range of mathematical and cryptographic constants,
//! including the mathematical constant "Euler", the hash algorithm
//! used, the cost of the hash algorithm, the length of the hash, the
//! mathematical constant "Phi", the mathematical constant "Pi", the
//! Planck constant, a set of special characters, and much more.
//!
//! ## Features
//!
//! The following table lists the Constants available in the Common
//! library.
//!
//!| Constants | Description |
//!| --- | --- |
//!| `EULER` | Euler's constant is a mathematical constant approximately equal to 2.71828. |
//!| `GAMMA` | The gamma constant is a mathematical constant approximately equal to 0.57721. |
//!| `HASH_ALGORITHM` | The hash algorithm used to generate the hash. The default is Blake3. |
//!| `HASH_COST` | The cost of the hash. |
//!| `HASH_LENGTH` | The length of the hash. |
//!| `PHI` | The golden ratio is a number approximately equal to 1.618033988749895. |
//!| `PI` | Pi is the ratio of a circle's circumference to its diameter. |
//!| `PLANCK` | Planck's constant is a physical constant that is approximately equal to 6.62607015 × 10−34 joule seconds. |
//!| `SILVER_RATIO` | The silver ratio is a number approximately equal to 1.414213562373095. |
//!| `SPECIAL_CHARS` | A list of special characters. |
//!| `SQRT2` | The square root of 2 is a number approximately equal to 1.414213562373095. |
//!| `SQRT5` | The square root of 5 is a number approximately equal to 2.23606797749979. |
//!
//! The following table lists the dictionaries available in the Common
//! library.
//!
//!| Words | Description |
//!| --- | --- |
//!| `words` | Contains a dictionary of common words. |
//!
//! ## Usage
//!
//! Common can be any `serde::Serialize` or `serde::Deserialize` types
//!
//! ## Examples
//!
//! ```rust
//!
//! // Import the Common libraries
//! extern crate cmn;
//! use cmn::Constants;
//! use cmn::Words;
//!
//! // Constants
//! let constants = Constants::new();
//! let constant = constants.constant("EULER");
//! assert_eq!(constant.unwrap().name, "EULER");
//!
//! // Words
//! let words = Words::new();
//! let words_list = words.words_list();
//! assert_eq!(words_list[0], "aboard");
//!
//! ```
//! ## License
//! The project is licensed under the terms of both the MIT license and
//! the Apache License (Version 2.0).
//! - [Apache License, Version 2.0](https://opensource.org/licenses/Apache-2.0)
//! - [MIT license](https://opensource.org/licenses/MIT)
//!
//! ## Contribution
//! Unless you explicitly state otherwise, any contribution
//! intentionally submitted for inclusion in the work by you, as
//! defined in the Apache-2.0 license, shall be dual licensed as above,
//! without any additional terms or conditions.
//!
/// The `serde` crate provides the `Serialize` and `Deserialize` traits
/// that are used to serialize and deserialize the data.
extern crate serde;
use ;
/// The `constants` module contains the `Constants` structure, which
/// provides a collection of constant values that are used throughout
/// the library.
pub use Constants;
/// The `words` module contains the `Words` structure, which provides a
/// collection of words that are used throughout the library.
pub use Words;
/// The `Common` structure provides a central location to store data
/// that is commonly used throughout the library. The structure
/// implements the `Serialize` and `Deserialize` traits from the `serde`
/// crate to enable serialization and deserialization of the data.
;