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,
},
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.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<NodeIndex, EdgeIndex> From<CsrError<NodeIndex, EdgeIndex>> for CsrSnapshotError<NodeIndex, EdgeIndex>
impl<NodeIndex, EdgeIndex> From<CsrError<NodeIndex, EdgeIndex>> for CsrSnapshotError<NodeIndex, EdgeIndex>
Source§impl<NodeIndex: PartialEq, EdgeIndex: PartialEq> PartialEq for CsrError<NodeIndex, EdgeIndex>
impl<NodeIndex: PartialEq, EdgeIndex: PartialEq> PartialEq for CsrError<NodeIndex, EdgeIndex>
impl<NodeIndex: Eq, EdgeIndex: Eq> Eq for CsrError<NodeIndex, EdgeIndex>
impl<NodeIndex, EdgeIndex> StructuralPartialEq for CsrError<NodeIndex, EdgeIndex>
Auto Trait Implementations§
impl<NodeIndex, EdgeIndex> Freeze for CsrError<NodeIndex, EdgeIndex>
impl<NodeIndex, EdgeIndex> RefUnwindSafe for CsrError<NodeIndex, EdgeIndex>where
NodeIndex: RefUnwindSafe,
EdgeIndex: RefUnwindSafe,
impl<NodeIndex, EdgeIndex> Send for CsrError<NodeIndex, EdgeIndex>
impl<NodeIndex, EdgeIndex> Sync for CsrError<NodeIndex, EdgeIndex>
impl<NodeIndex, EdgeIndex> Unpin for CsrError<NodeIndex, EdgeIndex>
impl<NodeIndex, EdgeIndex> UnsafeUnpin for CsrError<NodeIndex, EdgeIndex>where
NodeIndex: UnsafeUnpin,
EdgeIndex: UnsafeUnpin,
impl<NodeIndex, EdgeIndex> UnwindSafe for CsrError<NodeIndex, EdgeIndex>where
NodeIndex: UnwindSafe,
EdgeIndex: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more