pub enum Error {
Show 13 variants
Sqlite(Error),
SchemaTooNew {
found: i64,
supported: i64,
},
InvalidTimestamp(String),
Json(Error),
Search(Error),
Mutation(MutationError),
MintExhausted {
prefix: String,
rejected: usize,
},
InvalidEffect(String),
RevisionArchived {
rev: String,
archive: String,
path: Option<String>,
},
NotASegment {
path: String,
detail: String,
},
StaleSegment {
path: String,
rev: String,
},
RetentionPolicy(String),
Other(String),
}Expand description
Everything that can go wrong opening or writing a store.
Variants§
Sqlite(Error)
SQLite reported an error.
SchemaTooNew
The database’s user_version is newer than this build (spec §1 step 3).
InvalidTimestamp(String)
A timestamp is not RFC 3339 UTC as spec §2.4 requires.
Json(Error)
A JSON column did not parse (tree entries, attrs, detail).
Search(Error)
The embedding provider failed (spec/search §5).
Mutation(MutationError)
A mutation was refused (spec/mutate §8): the code and its data.
MintExhausted
A mint was rejected crate::MINT_GIVE_UP_AFTER times in a row
(spec §2.1): the minter cannot produce an id that is not in use.
Fields
InvalidEffect(String)
An effect a plan cannot read (spec/mutate §11): a malformed shape,
a field no target kind has, a value of the wrong type. The surface
reports it as filter_invalid.
RevisionArchived
A read of an archived revision whose segment is not recorded, or
recorded but not on disk (spec §6.2 “Through a segment”, 15.0; the
surface’s revision_archived { rev, archive, path? }).
Fields
NotASegment
A file that is not an archive segment, or one of another repository (spec §7.1 “Attach / detach”).
Fields
StaleSegment
An unrecorded segment under the archives directory names both live and non-live revisions (spec §7.1 “The crash rule”): it predates another squash or belongs to another store.
RetentionPolicy(String)
A malformed retention policy (spec §7.1 “The policy”).
Other(String)
Anything else, with a message.
Implementations§
Source§impl Error
impl Error
Sourcepub fn as_mutation(&self) -> Option<&MutationError>
pub fn as_mutation(&self) -> Option<&MutationError>
The mutation error inside, if this is one.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()