aocsol 0.1.1

Crate to generate solver for AOC puzzle.
Documentation
//! A crate that holds solutions to [Advent of Code](https://adventofcode.com)(AoC) puzzles.
//! The solutions are implemented in async rust, thus need an async runtime such as [`tokio`](https://docs.rs/tokio/1.28.1/tokio).
//!
//! # Feature-flags
//! By default, [`Puzzl`] and [`Solve`] traits are provided.
//!
//! To generate solvers for a puzzle using [`solver`],
//! add `solvers` [feature flag] in Cargo.toml
//!
//! If you wish to implement your own solver, and only require some
//! useful utilities, add `toolcase` [feature flag] in Cargo.toml
//!
//! # Examples
//!
//! Two traits [`Puzzl`] and [`Solve`] are provided to interface with the
//! solvers.
//!
//! ```no_run
//! use std::{error, sync::Arc};
//!
//! use aocsol::{puzzle::Puzzl, solver};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn error::Error + Send + Sync>> {
//!     let data = "1000\n2000\n\n4000\n\n5000\n6000\n\n7000\n9000";
//!     let puzzle = AocPuzzle(Arc::from(data));
//!     let solver = solver::solver(puzzle)?;   // solver generated
//!
//!     let answer_part_one: u32 = solver.part_one().await?.to_string().parse()?;
//!     let answer_part_two: u32 = solver.part_two().await?.to_string().parse()?;
//!
//!     assert_eq!(16000, answer_part_one);
//!     assert_eq!(31000, answer_part_two);
//!
//!     Ok(())
//! }
//!
//! // Sturct to hold data.
//! struct AocPuzzle(Arc<str>);
//!
//! // Implement Puzzl<InputType = Arc<str>> to generate solver using aocsol::solver::solver().
//! impl<'input> Puzzl for AocPuzzle {
//!     type InputType = Arc<str>;
//!
//!     fn year(&self) -> u32 {
//!         2022
//!     }
//!
//!     fn day(&self) -> u32 {
//!         1
//!     }
//!
//!     fn data(&self) -> Self::InputType {
//!         Arc::clone(&self.0)
//!     }
//! }
//! ```
//!
//! [`Puzzl`]: crate::puzzle::Puzzl
//! [`Solve`]: crate::puzzle::Solve
//! [feature flag]: https://doc.rust-lang.org/cargo/reference/features.html#the-features-section

pub mod error;
pub mod puzzle;

#[cfg(feature = "toolcase")]
pub mod toolcase;

#[cfg(feature = "solvers")]
pub mod solver;

pub(crate) mod macros;

#[cfg(all(test, feature = "solvers"))]
#[macro_use]
extern crate lazy_static;