#[non_exhaustive]pub enum WorkspaceError {
BadName {
name: String,
why: NameProblem,
},
NoSuchDatabase {
name: DbName,
path: PathBuf,
},
Busy {
name: DbName,
},
Io {
path: PathBuf,
source: Error,
},
Host(HostError),
}Expand description
Every way a workspace operation can fail.
Opening one database still fails as a HostError; this type adds the
failures that only exist once databases are addressed by name.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BadName
The string is not a usable database name.
Fields
why: NameProblemWhat specifically was wrong with it.
NoSuchDatabase
No database of that name exists, and the caller asked not to create one.
Busy
The database is open for writing elsewhere.
Distinct from HostError::Locked so the message can name the database
rather than a path the caller never typed. One file has one writer, and
in a workspace the other writer is usually a long-running sidecar that
will release it once the handle goes idle.
Io
A filesystem operation on the workspace itself failed.
Host(HostError)
Opening or using one of the databases failed.
Trait Implementations§
Source§impl Debug for WorkspaceError
impl Debug for WorkspaceError
Source§impl Display for WorkspaceError
impl Display for WorkspaceError
Source§impl Error for WorkspaceError
impl Error for WorkspaceError
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()