pub enum Error {
Show 16 variants
NotFound(PathBuf),
Io(PathBuf, Error),
Parse(PathBuf, Error),
InvalidDriver {
driver: Driver,
dialect: Dialect,
},
InvalidCredentials(String),
InvalidConfig(String),
Glob(String, PatternError),
GlobRead(String, GlobError),
SchemaPathNotFound(String),
SchemaPatternMatchedNothing(String),
NoSchemaFiles(String),
EnvNotFound(String),
EnvInvalid(String, String),
NoDatabases,
DatabaseNotFound(String),
DatabaseRequired(Vec<String>),
}Expand description
Errors from loading or using a config file.
Variants§
NotFound(PathBuf)
The config file does not exist.
Io(PathBuf, Error)
The config file could not be read.
Parse(PathBuf, Error)
The config file is not valid TOML for the config shape.
InvalidDriver
driver does not belong to dialect.
InvalidCredentials(String)
dbCredentials is malformed or does not fit the dialect/driver.
InvalidConfig(String)
A setting is not allowed, e.g. a PostgreSQL-only filter on SQLite.
Glob(String, PatternError)
A schema glob pattern is invalid.
GlobRead(String, GlobError)
Expanding a schema glob failed.
SchemaPathNotFound(String)
A listed schema path does not exist.
SchemaPatternMatchedNothing(String)
A schema glob matched no files.
NoSchemaFiles(String)
No schema files are configured.
EnvNotFound(String)
An { env = "VAR" } value names an unset variable.
EnvInvalid(String, String)
An { env = "VAR" } value is not valid UTF-8.
NoDatabases
The config has no databases.
DatabaseNotFound(String)
No database has the requested name.
DatabaseRequired(Vec<String>)
Several databases are configured and none was chosen with --db.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ConfigValueError> for Error
impl From<ConfigValueError> for Error
Source§fn from(err: ConfigValueError) -> Self
fn from(err: ConfigValueError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more
Source§impl<Joined, From> JoinKey<From, JoinReverse> for Joined
impl<Joined, From> JoinKey<From, JoinReverse> for Joined
impl<List> ListIncludes<Nil, ()> for List
impl<Mk> MarkerAggValidFor<()> for Mk
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more