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
mod checksum;
mod iota_units;
mod seed_random_generator;
mod stopwatch;
mod validators;
pub mod constants;
pub mod converter;
pub mod input_validator;
pub mod trit_adder;
pub mod trytes_converter;
pub mod unit_converter;
pub use self::checksum::*;
pub use self::iota_units::IotaUnits;
pub use self::seed_random_generator::generate_new_seed;
pub use self::stopwatch::StopWatch;
pub use self::validators::*;
pub fn right_pad_string(x: &mut String, len: usize, pad: char) {
while x.len() < len {
x.push(pad);
}
}
pub fn right_pad_vec<T>(x: &mut Vec<T>, len: usize, pad: T)
where
T: Copy,
{
while x.len() < len {
x.push(pad);
}
}