mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-11-18 06:19:28 +00:00
13 lines
285 B
Rust
13 lines
285 B
Rust
//! Types and traits for decoding values from the database.
|
|
|
|
use crate::database::HasRawValue;
|
|
|
|
/// Decode a single value from the database.
|
|
pub trait Decode<'de, DB>
|
|
where
|
|
Self: Sized + 'de,
|
|
DB: HasRawValue<'de>,
|
|
{
|
|
fn decode(value: DB::RawValue) -> crate::Result<Self>;
|
|
}
|