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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//! Typed provider failures.
use super::{ChunkId, DatasetId, LogicalRow};
/// Failure to describe or produce an out-of-core chunk.
#[derive(Clone, Debug, PartialEq, Eq, thiserror::Error)]
#[non_exhaustive]
pub enum ProviderError {
/// A dataset with rows was configured with no chunks.
#[error("dataset {dataset} has {rows} rows but no chunks")]
MissingChunks {
/// Invalid dataset.
dataset: DatasetId,
/// Declared logical rows.
rows: u64,
},
/// A chunk size of zero cannot make progress.
#[error("dataset {dataset} has a zero-row chunk size")]
ZeroChunkRows {
/// Invalid dataset.
dataset: DatasetId,
},
/// Dataset arithmetic exceeded its 64-bit identity space.
#[error("dataset {dataset} {field} overflows 64-bit provider identity")]
IdentityOverflow {
/// Dataset whose layout overflowed.
dataset: DatasetId,
/// Arithmetic field that overflowed.
field: &'static str,
},
/// Two datasets use the same stable identity.
#[error("dataset identity {dataset} is duplicated")]
DuplicateDataset {
/// Duplicated identity.
dataset: DatasetId,
},
/// Two dataset chunk ranges overlap.
#[error("chunk {chunk} belongs to more than one dataset")]
OverlappingChunkRange {
/// First overlapping chunk.
chunk: ChunkId,
},
/// A requested dataset does not exist in the catalog.
#[error("dataset {dataset} is not present in the catalog")]
UnknownDataset {
/// Missing identity.
dataset: DatasetId,
},
/// A requested chunk does not belong to the provider.
#[error("chunk {chunk} does not belong to dataset {dataset}")]
UnknownChunk {
/// Provider dataset.
dataset: DatasetId,
/// Requested chunk.
chunk: ChunkId,
},
/// A logical row does not fit in the requested dataset.
#[error("logical row {row} lies outside dataset {dataset}")]
LogicalRowOutOfRange {
/// Provider dataset.
dataset: DatasetId,
/// Invalid row.
row: LogicalRow,
},
/// A local row does not fit in its chunk.
#[error("local row {row} lies outside a chunk of {rows} rows")]
LocalRowOutOfRange {
/// Invalid local row.
row: u32,
/// Chunk row count.
rows: u32,
},
/// The supplied payload has a different row count than its descriptor.
#[error("chunk payload has {actual} rows but its descriptor declares {declared}")]
PayloadLengthMismatch {
/// Descriptor row count.
declared: u32,
/// Payload row count.
actual: u32,
},
/// A structure adapter cannot find the requested storage chunk.
#[error("structure storage chunk {index} is unavailable")]
StorageChunkUnavailable {
/// Structure-local chunk ordinal.
index: usize,
},
/// A structure has no requested model coordinate block.
#[error("structure model {model} has no direct coordinate block")]
ModelUnavailable {
/// Structure-local model ordinal.
model: u32,
},
/// A requested property is absent.
#[error("structure has no atom property named {name}")]
PropertyUnavailable {
/// Exact property name.
name: Box<str>,
},
/// A property does not align to the structure's atom rows.
#[error("property {name} has {actual} rows but the structure has {expected}")]
PropertyLengthMismatch {
/// Exact property name.
name: Box<str>,
/// Structure atom rows.
expected: u32,
/// Property rows.
actual: u32,
},
/// The structure does not carry a complete bond topology.
#[error("structure bond topology is unavailable")]
BondTopologyUnavailable,
/// A bond payload range does not fit the retained immutable bond table.
#[error("bond rows [{first}, {end}) exceed the retained table of {rows} rows")]
BondRangeUnavailable {
/// First requested source bond row.
first: u64,
/// Exclusive requested source bond row.
end: u64,
/// Rows retained by the source table.
rows: u64,
},
}