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
//! The Sudoku library
//!
//! ## Overview
//!
//! Sudoku is a library that aims to provide a simple API to solve sudokus
//! without having to deal with too much details.
//!
//! ## Example
//!
//! ```
//! use sudoku::Sudoku;
//!
//! let sudoku_block =
//! "___|2__|_63
//! 3__|__5|4_1
//! __1|__3|98_
//! ---+---+---
//! ___|___|_9_
//! ___|538|___
//! _3_|___|___
//! ---+---+---
//! _26|3__|5__
//! 5_3|7__|__8
//! 47_|__1|___";
//!
//! let sudoku_line = "...2...633....54.1..1..398........9....538....3........263..5..5.37....847...1...";
//!
//! // Sudokus can be created from &str's in both block or line formats or directly from bytes.
//! let sudoku = Sudoku::from_str_block_permissive(sudoku_block).unwrap();
//! let sudoku = Sudoku::from_str_line(sudoku_line).unwrap();
//! // Sudoku::from_bytes(some_bytes_arr);
//! // Sudoku::from_bytes_slice(some_slice);
//!
//! // Solve, print or convert the sudoku to another format
//! if let Some(solution) = sudoku.solve_unique() {
//! println!("{}", solution);
//! println!("{}", solution.to_str_line());
//!
//! let cell_contents: [u8; 81] = solution.to_bytes();
//! }
//! ```
extern crate serde;
extern crate core;
extern crate rand;
pub use Sudoku;
//pub use types::{LineFormatParseError, BlockFormatParseError, PubEntry as Entry};
/// Contains errors for the various parsing modes