sqlx-gen 0.5.4

Generate Rust structs from database schema introspection
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::io;

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("Database error: {0}")]
    Database(#[from] sqlx::Error),

    #[error("IO error: {0}")]
    Io(#[from] io::Error),

    #[error("{0}")]
    Config(String),
}

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