blkar_lib/
lib.rs

1#[cfg(test)]
2#[macro_use]
3extern crate quickcheck;
4
5#[macro_use]
6extern crate nom;
7
8extern crate clap;
9
10extern crate rand;
11
12extern crate chrono;
13
14extern crate smallvec;
15extern crate ctrlc;
16
17extern crate reed_solomon_erasure;
18
19extern crate sha1;
20extern crate sha2;
21extern crate blake2_c;
22
23mod crc_ccitt;
24
25macro_rules! smallvec {
26    [
27        $arr:ty => $val:expr; $len:expr
28    ] => {{
29        let mut v : SmallVec<$arr> = SmallVec::with_capacity($len);
30        for _ in 0..$len {
31            v.push($val);
32        }
33        v
34    }};
35    [
36        $val:expr; $len:expr
37    ] => {{
38        let mut v = SmallVec::with_capacity($len);
39        for _ in 0..$len {
40            v.push($val);
41        }
42        v
43    }}
44}
45
46macro_rules! break_if_eof_seen {
47    (
48        $read_res:expr
49    ) => {
50        if $read_res.eof_seen { break; }
51    }
52}
53
54mod file_error;
55mod stdin_error;
56mod stdout_error;
57
58mod general_error;
59use general_error::Error;
60use general_error::ErrorKind;
61
62#[macro_use]
63mod json_macros;
64
65#[macro_use]
66mod misc_macros;
67
68#[macro_use]
69mod cli_macros;
70
71#[macro_use]
72mod block_preds;
73
74mod multihash;
75mod multihash_tests;
76pub mod json_printer;
77mod json_utils;
78mod misc_utils;
79mod misc_utils_tests;
80mod file_utils;
81mod file_utils_tests;
82mod rand_utils;
83mod time_utils;
84mod time_utils_tests;
85mod integer_utils;
86mod integer_utils_tests;
87mod block_utils;
88pub mod output_channel;
89
90pub mod sbx_block;
91pub mod sbx_specs;
92mod sbx_specs_tests;
93
94mod log;
95
96mod rs_codec;
97
98mod encode_core;
99mod decode_core;
100mod rescue_core;
101mod repair_core;
102mod show_core;
103mod sort_core;
104mod check_core;
105
106mod progress_report;
107
108mod reader;
109mod file_reader;
110mod writer;
111mod file_writer;
112
113mod cli_utils;
114
115pub mod cli_encode;
116pub mod cli_decode;
117pub mod cli_rescue;
118pub mod cli_show;
119pub mod cli_repair;
120pub mod cli_check;
121pub mod cli_sort;
122pub mod cli_calc;