pub enum YugenDbError {
Show 15 variants
NotFound {
message: String,
},
ConnectionError {
message: String,
},
SerialisationError {
message: String,
},
DeserialisationError {
message: String,
},
Timeout {
message: String,
},
Conflict {
message: String,
},
TransactionAborted {
message: String,
},
UnsupportedFeature {
feature: String,
message: String,
},
ConstraintViolation {
message: String,
},
InvalidKey {
message: String,
},
InvalidNamespace {
message: String,
},
InvalidCollection {
message: String,
},
InvalidValue {
message: String,
},
DriverError {
driver: String,
message: String,
},
InternalError {
message: String,
},
}Expand description
Main structured error type for yugendb.
Variants§
NotFound
A requested record was not found when the operation required it.
ConnectionError
A backend connection could not be opened or used.
SerialisationError
A value could not be serialised.
DeserialisationError
Stored bytes could not be deserialised into the requested type.
Timeout
An operation exceeded its allowed time.
Conflict
An operation conflicted with existing data or concurrent work.
TransactionAborted
A transaction was aborted.
UnsupportedFeature
The selected driver does not support the requested feature.
ConstraintViolation
A storage constraint was violated.
InvalidKey
A key was invalid.
InvalidNamespace
A namespace was invalid.
InvalidCollection
A collection name was invalid.
InvalidValue
A value was invalid.
DriverError
A driver reported a backend-specific failure.
InternalError
A yugendb invariant failed.
Implementations§
Source§impl YugenDbError
impl YugenDbError
Sourcepub fn connection_error(message: impl Into<String>) -> Self
pub fn connection_error(message: impl Into<String>) -> Self
Creates a connection error.
Sourcepub fn serialisation_error(message: impl Into<String>) -> Self
pub fn serialisation_error(message: impl Into<String>) -> Self
Creates a serialisation error.
Sourcepub fn deserialisation_error(message: impl Into<String>) -> Self
pub fn deserialisation_error(message: impl Into<String>) -> Self
Creates a deserialisation error.
Sourcepub fn transaction_aborted(message: impl Into<String>) -> Self
pub fn transaction_aborted(message: impl Into<String>) -> Self
Creates a transaction aborted error.
Sourcepub fn unsupported_feature(
feature: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn unsupported_feature( feature: impl Into<String>, message: impl Into<String>, ) -> Self
Creates an unsupported feature error.
Sourcepub fn constraint_violation(message: impl Into<String>) -> Self
pub fn constraint_violation(message: impl Into<String>) -> Self
Creates a constraint violation error.
Sourcepub fn invalid_key(message: impl Into<String>) -> Self
pub fn invalid_key(message: impl Into<String>) -> Self
Creates an invalid key error.
Sourcepub fn invalid_namespace(message: impl Into<String>) -> Self
pub fn invalid_namespace(message: impl Into<String>) -> Self
Creates an invalid namespace error.
Sourcepub fn invalid_collection(message: impl Into<String>) -> Self
pub fn invalid_collection(message: impl Into<String>) -> Self
Creates an invalid collection error.
Sourcepub fn invalid_value(message: impl Into<String>) -> Self
pub fn invalid_value(message: impl Into<String>) -> Self
Creates an invalid value error.
Sourcepub fn driver_error(
driver: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn driver_error( driver: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a driver error.
Sourcepub fn internal_error(message: impl Into<String>) -> Self
pub fn internal_error(message: impl Into<String>) -> Self
Creates an invariant error.
Trait Implementations§
Source§impl Debug for YugenDbError
impl Debug for YugenDbError
Source§impl Display for YugenDbError
impl Display for YugenDbError
Source§impl Error for YugenDbError
impl Error for YugenDbError
1.30.0 · 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
use the Display impl or to_string()