pub enum GraphError {
EntityNotFound(EntityId),
EdgeNotFound(EdgeId),
InvalidEntityReference(EntityId),
EntityAlreadyExists(EntityId),
EdgeAlreadyExists(EdgeId),
Encoding(String),
Storage(StorageError),
Internal(String),
InvalidWeight {
edge_id: EdgeId,
message: String,
},
DataCorruption(String),
GraphTooLarge {
node_count: usize,
limit: usize,
},
}Expand description
Errors that can occur in graph storage operations.
Variants§
EntityNotFound(EntityId)
An entity (node) was not found.
EdgeNotFound(EdgeId)
An edge was not found.
InvalidEntityReference(EntityId)
Referenced entity does not exist when creating an edge.
EntityAlreadyExists(EntityId)
An entity with the given ID already exists.
EdgeAlreadyExists(EdgeId)
An edge with the given ID already exists.
Encoding(String)
An encoding or decoding error occurred.
Storage(StorageError)
A storage backend error occurred.
Internal(String)
An internal error occurred.
InvalidWeight
An invalid edge weight was encountered.
Fields
DataCorruption(String)
Data corruption detected in storage.
GraphTooLarge
Graph is too large for the requested operation.
Trait Implementations§
Source§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
Source§impl Error for GraphError
impl Error for GraphError
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 From<CoreError> for GraphError
impl From<CoreError> for GraphError
Source§impl From<StorageError> for GraphError
impl From<StorageError> for GraphError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for GraphError
impl !UnwindSafe for GraphError
impl Freeze for GraphError
impl Send for GraphError
impl Sync for GraphError
impl Unpin for GraphError
impl UnsafeUnpin for GraphError
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