pub enum Error {
Io(Error),
Serialize(Error),
Auth(AuthError),
Backend(BackendError),
Instance(InstanceError),
CRDT(CRDTError),
Store(StoreError),
Transaction(TransactionError),
Sync(SyncError),
Entry(EntryError),
Id(IdError),
User(UserError),
}Expand description
Common error type for the Eidetica library.
Variants§
Io(Error)
Serialize(Error)
Auth(AuthError)
Structured authentication errors from the auth module
Backend(BackendError)
Structured database errors from the backend module
Instance(InstanceError)
Structured base database errors from the instance module
CRDT(CRDTError)
Structured CRDT errors from the crdt module
Store(StoreError)
Structured subtree errors from the store module
Transaction(TransactionError)
Structured transaction errors from the transaction module
Sync(SyncError)
Structured synchronization errors from the sync module
Entry(EntryError)
Structured entry errors from the entry module
Id(IdError)
Structured ID errors from the entry::id module
User(UserError)
Structured user errors from the user module
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Check if this error indicates a resource was not found.
Sourcepub fn is_permission_denied(&self) -> bool
pub fn is_permission_denied(&self) -> bool
Check if this error indicates permission was denied.
Sourcepub fn is_conflict(&self) -> bool
pub fn is_conflict(&self) -> bool
Check if this error indicates a conflict (already exists).
Sourcepub fn is_authentication_error(&self) -> bool
pub fn is_authentication_error(&self) -> bool
Check if this error is authentication-related.
Sourcepub fn is_database_error(&self) -> bool
pub fn is_database_error(&self) -> bool
Check if this error is database/backend-related.
Sourcepub fn is_integrity_error(&self) -> bool
pub fn is_integrity_error(&self) -> bool
Check if this error indicates a data integrity issue.
Sourcepub fn is_io_error(&self) -> bool
pub fn is_io_error(&self) -> bool
Check if this error is I/O related.
Sourcepub fn is_base_database_error(&self) -> bool
pub fn is_base_database_error(&self) -> bool
Check if this error is base database-related.
Sourcepub fn is_validation_error(&self) -> bool
pub fn is_validation_error(&self) -> bool
Check if this error is validation-related.
Sourcepub fn is_operation_error(&self) -> bool
pub fn is_operation_error(&self) -> bool
Check if this error is operation-related.
Sourcepub fn is_type_error(&self) -> bool
pub fn is_type_error(&self) -> bool
Check if this error is type-related.
Sourcepub fn is_crdt_error(&self) -> bool
pub fn is_crdt_error(&self) -> bool
Check if this error is CRDT-related.
Sourcepub fn is_crdt_merge_error(&self) -> bool
pub fn is_crdt_merge_error(&self) -> bool
Check if this error is a CRDT merge failure.
Sourcepub fn is_crdt_serialization_error(&self) -> bool
pub fn is_crdt_serialization_error(&self) -> bool
Check if this error is a CRDT serialization failure.
Sourcepub fn is_crdt_type_error(&self) -> bool
pub fn is_crdt_type_error(&self) -> bool
Check if this error is a CRDT type mismatch.
Sourcepub fn is_store_error(&self) -> bool
pub fn is_store_error(&self) -> bool
Check if this error is store-related.
Sourcepub fn is_store_serialization_error(&self) -> bool
pub fn is_store_serialization_error(&self) -> bool
Check if this error is a store serialization failure.
Sourcepub fn is_store_type_error(&self) -> bool
pub fn is_store_type_error(&self) -> bool
Check if this error is a store type mismatch.
Sourcepub fn is_already_committed(&self) -> bool
pub fn is_already_committed(&self) -> bool
Check if this error indicates an operation was already committed.
Sourcepub fn is_entry_error(&self) -> bool
pub fn is_entry_error(&self) -> bool
Check if this error is related to entry operations.
Sourcepub fn is_id_error(&self) -> bool
pub fn is_id_error(&self) -> bool
Check if this error is specifically about ID validation.
Sourcepub fn is_entry_validation_error(&self) -> bool
pub fn is_entry_validation_error(&self) -> bool
Check if this error is specifically about entry structure validation.
Sourcepub fn is_entry_serialization_error(&self) -> bool
pub fn is_entry_serialization_error(&self) -> bool
Check if this error is specifically about entry serialization.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
Source§impl From<BackendError> for Error
impl From<BackendError> for Error
Source§fn from(err: BackendError) -> Self
fn from(err: BackendError) -> Self
Source§impl From<EntryError> for Error
impl From<EntryError> for Error
Source§fn from(err: EntryError) -> Self
fn from(err: EntryError) -> Self
Source§impl From<InstanceError> for Error
impl From<InstanceError> for Error
Source§fn from(err: InstanceError) -> Self
fn from(err: InstanceError) -> Self
Source§impl From<StoreError> for Error
impl From<StoreError> for Error
Source§fn from(err: StoreError) -> Self
fn from(err: StoreError) -> Self
Source§impl From<TransactionError> for Error
impl From<TransactionError> for Error
Source§fn from(err: TransactionError) -> Self
fn from(err: TransactionError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.