#[non_exhaustive]pub enum EngineError {
EndOfFile,
WrongCommand,
Unsupported,
InvalidName,
Internal,
}Expand description
Errors a storage engine can return; each maps to a MySQL HA_ERR_* code
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EndOfFile
End of a table or index scan, returned from StorageEngine::rnd_next
when the scan is exhausted.
WrongCommand
The engine does not support the requested operation
Unsupported
The requested operation is unsupported on this engine, mapped to
HA_ERR_UNSUPPORTED. Distinct from WrongCommand:
MySQL uses this code for capability gaps such as bulk-load execution
that the engine has not opted into.
InvalidName
The supplied table or schema name is not valid UTF-8 or otherwise
unusable. Mapped to HA_ERR_WRONG_TABLE_NAME so operators see a
name-level diagnostic instead of a generic internal error.
Internal
Generic internal error; prefer a more specific variant when possible
Implementations§
Source§impl EngineError
impl EngineError
Sourcepub fn to_mysql_errno(self) -> i32
pub fn to_mysql_errno(self) -> i32
Convert to the matching MySQL HA_ERR_* integer expected at the
extern "C" boundary.
Trait Implementations§
Source§impl Clone for EngineError
impl Clone for EngineError
Source§fn clone(&self) -> EngineError
fn clone(&self) -> EngineError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EngineError
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
impl Eq for EngineError
Source§impl Error for EngineError
impl Error for EngineError
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 PartialEq for EngineError
impl PartialEq for EngineError
Source§fn eq(&self, other: &EngineError) -> bool
fn eq(&self, other: &EngineError) -> bool
self and other values to be equal, and is used by ==.