pub trait TryGetable: Sized {
// Required method
fn try_get_by<I: ColIdx>(
res: &QueryResult,
index: I,
) -> Result<Self, TryGetError>;
// Provided methods
fn try_get(
res: &QueryResult,
pre: &str,
col: &str,
) -> Result<Self, TryGetError> { ... }
fn try_get_by_index(
res: &QueryResult,
index: usize,
) -> Result<Self, TryGetError> { ... }
}Expand description
An interface to get a value from the query result
Required Methodsยง
Sourcefn try_get_by<I: ColIdx>(
res: &QueryResult,
index: I,
) -> Result<Self, TryGetError>
fn try_get_by<I: ColIdx>( res: &QueryResult, index: I, ) -> Result<Self, TryGetError>
Get a value from the query result with an ColIdx
Provided Methodsยง
Sourcefn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>
fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>
Get a value from the query result with prefixed column name
Sourcefn try_get_by_index(
res: &QueryResult,
index: usize,
) -> Result<Self, TryGetError>
fn try_get_by_index( res: &QueryResult, index: usize, ) -> Result<Self, TryGetError>
Get a value from the query result based on the order in the select expressions
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.
Implementations on Foreign Typesยง
Sourceยงimpl TryGetable for bool
impl TryGetable for bool
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for f32
impl TryGetable for f32
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for f64
impl TryGetable for f64
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for i8
impl TryGetable for i8
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for i16
impl TryGetable for i16
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for i32
impl TryGetable for i32
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for i64
impl TryGetable for i64
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for u8
impl TryGetable for u8
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for u16
impl TryGetable for u16
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for u32
impl TryGetable for u32
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for u64
impl TryGetable for u64
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for String
impl TryGetable for String
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Value>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Value>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<bool>
Available on crate feature postgres-array only.
impl TryGetable for Vec<bool>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<f32>
Available on crate feature postgres-array only.
impl TryGetable for Vec<f32>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<f64>
Available on crate feature postgres-array only.
impl TryGetable for Vec<f64>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<i8>
Available on crate feature postgres-array only.
impl TryGetable for Vec<i8>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<i16>
Available on crate feature postgres-array only.
impl TryGetable for Vec<i16>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<i32>
Available on crate feature postgres-array only.
impl TryGetable for Vec<i32>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<i64>
Available on crate feature postgres-array only.
impl TryGetable for Vec<i64>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<u8>
impl TryGetable for Vec<u8>
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<u32>
Available on crate feature postgres-array only.
impl TryGetable for Vec<u32>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<NaiveDate>
Available on crate feature postgres-array only.
impl TryGetable for Vec<NaiveDate>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<NaiveDateTime>
Available on crate feature postgres-array only.
impl TryGetable for Vec<NaiveDateTime>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Decimal>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Decimal>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<NaiveTime>
Available on crate feature postgres-array only.
impl TryGetable for Vec<NaiveTime>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Date>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Date>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<PrimitiveDateTime>
Available on crate feature postgres-array only.
impl TryGetable for Vec<PrimitiveDateTime>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<OffsetDateTime>
Available on crate feature postgres-array only.
impl TryGetable for Vec<OffsetDateTime>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Time>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Time>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Uuid>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Uuid>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<String>
Available on crate feature postgres-array only.
impl TryGetable for Vec<String>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Vec<u8>>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Vec<u8>>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<DateTime<FixedOffset>>
Available on crate feature postgres-array only.
impl TryGetable for Vec<DateTime<FixedOffset>>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<DateTime<Local>>
Available on crate feature postgres-array only.
impl TryGetable for Vec<DateTime<Local>>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<DateTime<Utc>>
Available on crate feature postgres-array only.
impl TryGetable for Vec<DateTime<Utc>>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Braced>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Braced>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Hyphenated>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Hyphenated>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Simple>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Simple>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Vec<Urn>
Available on crate feature postgres-array only.
impl TryGetable for Vec<Urn>
Available on crate feature
postgres-array only.fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for DateTime<FixedOffset>
impl TryGetable for DateTime<FixedOffset>
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for DateTime<Local>
impl TryGetable for DateTime<Local>
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for DateTime<Utc>
impl TryGetable for DateTime<Utc>
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Braced
impl TryGetable for Braced
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Hyphenated
impl TryGetable for Hyphenated
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Simple
impl TryGetable for Simple
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl TryGetable for Urn
impl TryGetable for Urn
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Sourceยงimpl<T> TryGetable for Vec<T>where
T: TryGetableArray,
impl<T> TryGetable for Vec<T>where
T: TryGetableArray,
fn try_get_by<I: ColIdx>( res: &QueryResult, index: I, ) -> Result<Self, TryGetError>
Sourceยงimpl<T: TryGetable> TryGetable for Option<T>
impl<T: TryGetable> TryGetable for Option<T>
fn try_get_by<I: ColIdx>( res: &QueryResult, index: I, ) -> Result<Self, TryGetError>
Implementorsยง
impl TryGetable for Value
impl TryGetable for NaiveDate
impl TryGetable for NaiveDateTime
impl TryGetable for Decimal
Available on crate feature
with-rust_decimal only.impl TryGetable for Vector
Available on crate feature
postgres-vector only.impl TryGetable for NaiveTime
impl TryGetable for Date
impl TryGetable for PrimitiveDateTime
impl TryGetable for OffsetDateTime
impl TryGetable for Time
impl TryGetable for Uuid
impl TryGetable for PermissionId
Available on crate feature
rbac only.impl TryGetable for ResourceId
Available on crate feature
rbac only.impl TryGetable for RoleId
Available on crate feature
rbac only.impl TryGetable for UserId
Available on crate feature
rbac only.impl TryGetable for ChronoUnixTimestamp
Available on crate feature
with-chrono only.impl TryGetable for ChronoUnixTimestampMillis
Available on crate feature
with-chrono only.impl TryGetable for TimeUnixTimestamp
Available on crate feature
with-time only.impl TryGetable for TimeUnixTimestampMillis
Available on crate feature
with-time only.impl<T> TryGetable for Twhere
T: TryGetableFromJson,
Available on crate feature
with-json only.