besu 0.0.1

A typesafe, async, and database-agnostic query builder for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::error;

use crate::Driver;

/// A trait for decoding a row from a database.
pub trait DecodeRow<D: Driver> {
    /// Decode a row from the database.
    fn decode(row: D::Row) -> Result<Self, Box<dyn error::Error + Send + Sync + 'static>>
    where
        Self: Sized;
}

/// A trait for decoding a value from a database.
pub trait DecodeValue<D: Driver, T> {
    /// Decode a value from the database.
    fn decode<'q>(value: D::Value<'q>) -> Result<T, Box<dyn error::Error + Send + Sync + 'static>>;
}