pub enum GraphErrorKind {
NotFound {
query: Query,
},
NotSupported {
query: Query,
},
OutOfRange {
entry: GraphEntry,
index: usize,
max: usize,
},
IO {
entry: String,
error: Error,
},
Custom {
message: String,
},
}
Expand description
The real error type of a graph operation, it will not be exposed to the user, see GraphError
for more.
§Examples
use graph_theory::GraphEngine;
Variants§
NotFound
Some index is not found in storage.
§Examples
- edge id 0 out of range
use graph_theory::{GraphError, Query};
GraphError::not_found(Query::edge(0));
GraphError::edge_not_found(0);
NotSupported
Some index is not found in storage.
§Examples
- edge id 0 out of range
use graph_theory::{GraphError, Query};
GraphError::not_found(Query::edge(0));
GraphError::edge_not_found(0);
OutOfRange
Some index is out of range of storage.
Max index is 5, but you query index 6.
§Examples
use graph_theory::{GraphError, Query};
GraphError::not_found(Query::edge(0));
GraphError::node_out_of_range(6, 5);
Fields
§
entry: GraphEntry
The entry type of the error.
IO
Custom
Trait Implementations§
Source§impl Debug for GraphErrorKind
impl Debug for GraphErrorKind
Auto Trait Implementations§
impl Freeze for GraphErrorKind
impl !RefUnwindSafe for GraphErrorKind
impl Send for GraphErrorKind
impl Sync for GraphErrorKind
impl Unpin for GraphErrorKind
impl !UnwindSafe for GraphErrorKind
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