Enum mentat_db::errors::DbError
[−]
[src]
pub enum DbError { NotYetImplemented(String), BadValuePair(String, ValueType), BadSQLValuePair(Value, i32), BadBootstrapDefinition(String), BadSchemaAssertion(String), UnrecognizedIdent(String), UnrecognizedEntid(Entid), UnknownAttribute(Entid), CannotCacheNonUniqueAttributeInReverse(Entid), SchemaAlterationFailed(String), SchemaConstraintViolation(SchemaConstraintViolation), InputError(InputError), WrongTypeValueForFtsAssertion, }
Variants
NotYetImplemented(String)
We're just not done yet. Message that the feature is recognized but not yet implemented.
BadValuePair(String, ValueType)
We've been given a value that isn't the correct Mentat type.
BadSQLValuePair(Value, 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)
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. We also use this error if you try to transact an entid that we didn't allocate, in part because we blow the stack in error_chain if we define a new enum!
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
Trait Implementations
impl Debug for DbError
[src]
impl Debug for DbError
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Fail for DbError
[src]
impl Fail for DbError
fn cause(&self) -> Option<&Fail>
[src]
fn cause(&self) -> Option<&Fail>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it carries one. Read more
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
Provides context for this failure. Read more
fn compat(self) -> Compat<Self>
fn compat(self) -> Compat<Self>
Wraps this failure in a compatibility wrapper that implements std::error::Error
. Read more
ⓘImportant traits for Causes<'f>fn causes(&self) -> Causes
fn causes(&self) -> Causes
Returns a iterator over the causes of this Fail
with itself as the first item and the root_cause
as the final item. Read more
fn root_cause(&self) -> &(Fail + 'static)
fn root_cause(&self) -> &(Fail + 'static)
Returns the "root cause" of this Fail
- the last value in the cause chain which does not return an underlying cause
. Read more
impl Display for DbError
[src]
impl Display for DbError