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
//! A small QR code generation project I made to dip my toes into rust again
//! after several years of absence. I was always curious on how QR codes worked
//! and it was a pretty good project to explore rust with. I followed an
//! [excellent tutorial](https://www.thonky.com/qr-code-tutorial/).
//!
//! This library supports strings encoded in numeric, alphanumeric and byte mode.
//! It supports all versions, meaning different sizes, of a standard QR code with
//! the different error correction levels.
//!
//! # QR code as string output
//!
//! ```
//! extern crate rqr;
//! use rqr::{Qr, StringRenderer};
//!
//! fn main() {
//! let qr = Qr::new("HELLO WORLD").unwrap();
//! let s = StringRenderer::new().render(&qr);
//! println!("{}", s);
//! }
//! ```
//!
//! # SVG generation
//!
//! ```
//! use rqr::{Qr, SvgRenderer, Color, ECLevel};
//!
//! fn main() {
//! let qr = Qr::with_ecl("HELLO WORLD", ECLevel::Q).unwrap();
//! let s = SvgRenderer::new()
//! .light_module(Color::new(229, 189, 227))
//! .dark_module(Color::new(119, 0, 0))
//! .dimensions(200, 200)
//! .render(&qr);
//! println!("{}", s);
//! }
//! ```
//!
//! # Override inferred settings
//!
//! If not provided the version and encoding modes will be inferred to fit the
//! encoded message. It's possible to override these and others:
//!
//! ```
//! use rqr::{QrBuilder, ECLevel, Version, Mask, Mode};
//!
//! let qr = QrBuilder::new()
//! .ecl(ECLevel::L)
//! .version(Version::new(3))
//! .mask(Mask::new(0))
//! .mode(Mode::Alphanumeric)
//! .into("1234567890")
//! .unwrap();
//! ```
//!
//! More fine grained control is provided by the builder and the underlying matrix.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use ;
pub use Mode;
pub use Qr;
pub use *;
pub use Version;