pub enum DbErrorKind {
Show 33 variants
NotYetImplemented(String),
BadValuePair(String, ValueType),
BadSQLValuePair(SqlValue, i32),
BadBootstrapDefinition(String),
BadSchemaAssertion(String),
UnrecognizedIdent(String),
UnrecognizedEntid(Entid),
UnallocatedEntid(Entid),
UnknownAttribute(Entid),
CannotCacheNonUniqueAttributeInReverse(Entid),
SchemaAlterationFailed(String),
SchemaConstraintViolation(SchemaConstraintViolation),
InputError(InputError),
WrongTypeValueForFtsAssertion,
CacheUpdateFailed,
CouldNotSetVersionPragma,
CouldNotGetVersionPragma,
CouldNotSearch,
TxInsertFailedToAddMissingDatoms,
TxInsertFailedToRetractDatoms,
DatomsUpdateFailedToRetract,
DatomsUpdateFailedToAdd,
FailedToCreateTempTables,
NonFtsInsertionIntoTempSearchTableFailed,
FtsInsertionFailed,
FtsInsertionIntoTempSearchTableFailed,
FtsFailedToDropSearchIds,
FailedToUpdatePartitionMap,
TimelinesMixed,
TimelinesMoveToNonEmpty,
TimelinesInvalidRange,
CasMismatch {
e: i64,
a: i64,
expected: Option<String>,
actual: Option<String>,
},
RusqliteError(String),
}Variants§
NotYetImplemented(String)
We’re just not done yet. Recognized a feature that is not yet implemented.
BadValuePair(String, ValueType)
We’ve been given a value that isn’t the correct Mentat type.
BadSQLValuePair(SqlValue, i32)
We’ve got corrupt data in the SQL store: a value and value_type_tag don’t line up. TODO _1.data_type()
BadBootstrapDefinition(String)
The SQLite store user_version isn’t recognized. This could be an old version of Mentat trying to open a newer version SQLite store; or it could be a corrupt file; or … #[fail(display = “bad SQL store user_version: {}”, _0)] BadSQLiteStoreVersion(i32), A bootstrap definition couldn’t be parsed or installed. This is a programmer error, not a runtime error.
BadSchemaAssertion(String)
A schema assertion couldn’t be parsed.
UnrecognizedIdent(String)
An ident->entid mapping failed.
UnrecognizedEntid(Entid)
An entid->ident mapping failed.
UnallocatedEntid(Entid)
Tried to transact an entid that isn’t allocated.
UnknownAttribute(Entid)
CannotCacheNonUniqueAttributeInReverse(Entid)
SchemaAlterationFailed(String)
SchemaConstraintViolation(SchemaConstraintViolation)
A transaction tried to violate a constraint of the schema of the Mentat store.
InputError(InputError)
The transaction was malformed in some way (that was not recognized at parse time; for example, in a way that is schema-dependent).
WrongTypeValueForFtsAssertion
CacheUpdateFailed
CouldNotSetVersionPragma
CouldNotGetVersionPragma
CouldNotSearch
TxInsertFailedToAddMissingDatoms
TxInsertFailedToRetractDatoms
DatomsUpdateFailedToRetract
DatomsUpdateFailedToAdd
FailedToCreateTempTables
NonFtsInsertionIntoTempSearchTableFailed
FtsInsertionFailed
FtsInsertionIntoTempSearchTableFailed
FtsFailedToDropSearchIds
FailedToUpdatePartitionMap
TimelinesMixed
TimelinesMoveToNonEmpty
TimelinesInvalidRange
CasMismatch
A :db.fn/cas (compare-and-swap) found the current value of [e a]
did not match the expected old value, so the swap was rejected and the
whole transaction aborts. expected/actual are None when the value
is nil/absent.
RusqliteError(String)
Trait Implementations§
Source§impl Clone for DbErrorKind
impl Clone for DbErrorKind
Source§impl Debug for DbErrorKind
impl Debug for DbErrorKind
Source§impl Display for DbErrorKind
impl Display for DbErrorKind
Source§impl Error for DbErrorKind
impl Error for DbErrorKind
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()
Source§impl From<DbErrorKind> for DbError
impl From<DbErrorKind> for DbError
Source§fn from(kind: DbErrorKind) -> Self
fn from(kind: DbErrorKind) -> Self
Source§impl PartialEq for DbErrorKind
impl PartialEq for DbErrorKind
impl StructuralPartialEq for DbErrorKind
Auto Trait Implementations§
impl Freeze for DbErrorKind
impl RefUnwindSafe for DbErrorKind
impl Send for DbErrorKind
impl Sync for DbErrorKind
impl Unpin for DbErrorKind
impl UnsafeUnpin for DbErrorKind
impl UnwindSafe for DbErrorKind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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