grud/lib.rs
1//! Store and access data in two-dimensional grids.
2//!
3//! Simple use-cases can use the exported paths directly:
4//!
5//! ```
6//! use grud::Grid;
7//!
8//! let _ = Grid::new(2, 4, " ");
9//! ```
10//!
11//! Other modules are included for additional functionality.
12
13pub mod grid;
14pub mod point;
15
16pub use grid::Grid;
17
18pub mod prelude {
19 //! Most used paths within Grud, that can be imported easily.
20 //!
21 //! ```
22 //! use grud::prelude::*;
23 //!
24 //! fn uses_point(p: impl Point) {
25 //! assert_eq!(p.x(), 2);
26 //! assert_eq!(p.y(), 4);
27 //! }
28 //!
29 //! uses_point((2, 4));
30 //! uses_point([2, 4]);
31 //! ```
32
33 pub use crate::grid::Grid;
34 pub use crate::point::Point;
35}