km-to-sql 0.1.1

Helpers and shared logic for KotobaMedia to-sql tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use thiserror::Error as ThisError;

#[derive(ThisError, Debug)]
pub enum Error {
    #[error("Failed to parse metadata: {0}")]
    ParseMetadata(#[from] serde_json::Error),

    #[cfg(feature = "postgres")]
    #[error("Postgres error: {0}")]
    Postgres(#[from] tokio_postgres::Error),
}

pub type Result<T> = std::result::Result<T, Error>;