pub enum GraphError {
Io(Error),
Serialization(String),
Corruption(String),
NotFound(&'static str),
InvalidArgument(String),
UnsupportedFeature(&'static str),
}Expand description
Errors that can occur during database operations.
Sombra uses this comprehensive error type to handle all failure modes from I/O issues to data corruption to invalid usage.
Variants§
Io(Error)
I/O error from the underlying filesystem.
This can occur during file operations like reading, writing, or syncing data to disk.
Serialization(String)
Error during serialization or deserialization of data.
This occurs when data cannot be properly encoded or decoded, often due to format issues or buffer size problems.
Corruption(String)
Data corruption detected.
This is a critical error indicating that the database file or WAL has been corrupted. It may be recoverable with the repair tools, but data loss is possible.
NotFound(&'static str)
Requested resource was not found.
This occurs when trying to access a node or edge that doesn’t exist in the database.
InvalidArgument(String)
Invalid argument or operation.
This occurs for various reasons:
- Invalid configuration parameters
- Operations that violate database constraints
- Transaction limits exceeded
- Invalid property types for indexing
UnsupportedFeature(&'static str)
Feature is not yet implemented or supported.
This indicates that the requested operation is not available in the current version of Sombra.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for GraphError
impl !RefUnwindSafe for GraphError
impl Send for GraphError
impl Sync for GraphError
impl Unpin for GraphError
impl !UnwindSafe 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more