pub enum CsrError<NodeIndex, EdgeIndex> {
OffsetLengthOverflow {
node_count: NodeIndex,
},
OffsetLength {
expected: usize,
actual: usize,
},
FirstOffset {
actual: EdgeIndex,
},
NonMonotonicOffset {
index: usize,
previous: EdgeIndex,
actual: EdgeIndex,
},
FinalOffset {
final_offset: EdgeIndex,
target_len: usize,
},
TargetOutOfRange {
index: usize,
target: NodeIndex,
node_count: NodeIndex,
},
TargetUsizeOverflow {
index: usize,
value: NodeIndex,
},
NodeUsizeOverflow {
value: NodeIndex,
},
EdgeUsizeOverflow {
value: EdgeIndex,
},
}Expand description
CSR validation error.
§Performance
perf: unspecified; errors are returned only from validation paths.
Variants§
OffsetLengthOverflow
node_count + 1 overflowed usize.
Fields
node_count: NodeIndexNode count that could not be converted to an offset length.
OffsetLength
Offset slice length does not equal node_count + 1.
FirstOffset
The first CSR offset was not zero.
Fields
actual: EdgeIndexActual first offset.
NonMonotonicOffset
Offsets were not monotonically increasing.
FinalOffset
Final offset does not match target slice length.
TargetOutOfRange
Target node ID is outside 0..node_count.
TargetUsizeOverflow
A target node ID value could not be represented as usize on this
target (a width failure, distinct from an out-of-range target).
Fields
value: NodeIndexTarget value that did not fit in usize.
NodeUsizeOverflow
A node index value could not be represented as usize on this target.
Fields
value: NodeIndexNode value that could not be represented as usize.
EdgeUsizeOverflow
An edge index value could not be represented as usize on this target.
Fields
value: EdgeIndexEdge value that could not be represented as usize.
Trait Implementations§
Source§impl<NodeIndex, EdgeIndex> Error for CsrError<NodeIndex, EdgeIndex>
impl<NodeIndex, EdgeIndex> Error for CsrError<NodeIndex, EdgeIndex>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()