wabot-feature-sqlite 0.2.0

SQLite foundation for Wabot — the document store, migrations and connection handling, for a single-node deployment with no database server.
Documentation
//! Error type shared by the sqlite feature and its addons.

use thiserror::Error;

#[derive(Debug, Error)]
pub enum SqliteError {
    #[error("sqlite configuration error: {0}")]
    Config(String),
    #[error("sqlite error: {0}")]
    Database(#[from] rusqlite::Error),
    #[error("failed to (de)serialize stored document: {0}")]
    Serde(#[from] serde_json::Error),
    /// The blocking pool went away — only reachable while the runtime
    /// is shutting down, and worth its own variant so it is not read
    /// as a database fault.
    #[error("sqlite worker unavailable: {0}")]
    Worker(String),
    #[error("{0}")]
    Other(String),
}

pub type SqliteResult<T> = Result<T, SqliteError>;