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
#[derive(Debug, Clone, thiserror::Error)]
pub enum Error {
#[error("cell underflow")]
CellUnderflow,
#[error("cell overflow")]
CellOverflow,
#[error("pruned branch access")]
PrunedBranchAccess,
}
#[derive(Debug, Clone, thiserror::Error)]
pub enum ParseIntError {
#[error("cannot parse underlying integer")]
InvalidString(#[source] std::num::ParseIntError),
#[error("underlying integer is too large to fin in target type")]
Overflow,
}
#[derive(Debug, Clone, thiserror::Error)]
pub enum ParseAddrError {
#[error("cannot parse address from an empty string")]
Empty,
#[error("workchain id is too large to fit in target type")]
InvalidWorkchain,
#[error("cannot parse account id")]
InvalidAccountId,
#[error("unexpected address part")]
UnexpectedPart,
}
#[derive(Debug, Clone, thiserror::Error)]
pub enum ParseBlockIdError {
#[error("cannot parse block id from an empty string")]
Empty,
#[error("cannot parse workchain id")]
InvalidWorkchain,
#[error("invalid shard id")]
InvalidShardIdent,
#[error("cannot parse block seqno")]
InvalidSeqno,
#[error("cannot parse root hash")]
InvalidRootHash,
#[error("cannot parse file hash")]
InvalidFileHash,
#[error("unexpected block id part")]
UnexpectedPart,
}