pub trait PgRow {
// Required methods
fn get_value<T>(&self, column: &str) -> PgResult<T>
where T: for<'a> FromSql<'a>;
fn get_opt<T>(&self, column: &str) -> PgResult<Option<T>>
where T: for<'a> FromSql<'a>;
fn try_get<T>(&self, column: &str) -> Option<T>
where T: for<'a> FromSql<'a>;
}Expand description
Extension trait for PostgreSQL rows.
Required Methods§
Sourcefn get_value<T>(&self, column: &str) -> PgResult<T>where
T: for<'a> FromSql<'a>,
fn get_value<T>(&self, column: &str) -> PgResult<T>where
T: for<'a> FromSql<'a>,
Get a column value by name.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.