jstd/lib.rs
1extern crate self as jstd;
2
3/// Derive macro for strongly typed `usize` identifiers.
4///
5/// This derive is intended for tuple newtypes with exactly one `usize` field,
6/// and generates implementations for:
7/// - `Copy`, `Clone`, `Debug`, `Default`, `PartialEq`, `Eq`, `Hash`
8/// - `From<usize>` and `From<Self> for usize`
9/// - [`registry::Identifier`]
10///
11/// # Example
12/// ```
13/// use jstd::Identifier;
14///
15/// #[derive(Identifier)]
16/// pub struct MyId(usize);
17///
18/// let id = MyId::from(42usize);
19/// let raw: usize = id.into();
20/// assert_eq!(raw, 42);
21/// assert_eq!(MyId::default(), MyId::from(0usize));
22/// ```
23pub use jstd_derive::Identifier;
24
25pub mod graph;
26pub mod intern;
27pub mod log;
28pub mod num_ref;
29pub mod registry;
30pub mod stable_arena;
31pub mod triskel;