Skip to main content

TryGetable

Trait TryGetable 

pub trait TryGetable: Sized {
    // Required method
    fn try_get_by<I>(res: &QueryResult, index: I) -> Result<Self, TryGetError>
       where I: ColIdx;

    // 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§

fn try_get_by<I>(res: &QueryResult, index: I) -> Result<Self, TryGetError>
where I: ColIdx,

Get a value from the query result with an ColIdx

Provided Methods§

fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>

Get a value from the query result with prefixed column name

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".

Implementations on Foreign Types§

§

impl TryGetable for String

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<String, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<BigDecimal>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<BigDecimal>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<Braced>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<Braced>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<Date>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<Date>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<DateTime<FixedOffset>>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<DateTime<FixedOffset>>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<DateTime<Local>>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<DateTime<Local>>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<DateTime<Utc>>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<DateTime<Utc>>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<Decimal>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<Decimal>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<Hyphenated>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<Hyphenated>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<NaiveDate>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<NaiveDate>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<NaiveDateTime>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<NaiveDateTime>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<NaiveTime>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<NaiveTime>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<OffsetDateTime>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<OffsetDateTime>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<PrimitiveDateTime>

§

fn try_get_by<I>( res: &QueryResult, idx: I, ) -> Result<Vec<PrimitiveDateTime>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<Simple>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<Simple>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<String>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<String>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<Time>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<Time>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<Urn>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<Urn>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<Uuid>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<Uuid>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<Value>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<Value>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<bool>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<bool>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<f32>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<f32>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<f64>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<f64>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<i8>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<i8>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<i16>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<i16>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<i32>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<i32>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<i64>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<i64>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<u8>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<u8>, TryGetError>
where I: ColIdx,

§

impl TryGetable for Vec<u32>

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<Vec<u32>, TryGetError>
where I: ColIdx,

§

impl TryGetable for bool

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<bool, TryGetError>
where I: ColIdx,

§

impl TryGetable for f32

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<f32, TryGetError>
where I: ColIdx,

§

impl TryGetable for f64

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<f64, TryGetError>
where I: ColIdx,

§

impl TryGetable for i8

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<i8, TryGetError>
where I: ColIdx,

§

impl TryGetable for i16

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<i16, TryGetError>
where I: ColIdx,

§

impl TryGetable for i32

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<i32, TryGetError>
where I: ColIdx,

§

impl TryGetable for i64

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<i64, TryGetError>
where I: ColIdx,

§

impl TryGetable for u8

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<u8, TryGetError>
where I: ColIdx,

§

impl TryGetable for u16

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<u16, TryGetError>
where I: ColIdx,

§

impl TryGetable for u32

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<u32, TryGetError>
where I: ColIdx,

§

impl TryGetable for u64

§

fn try_get_by<I>(res: &QueryResult, idx: I) -> Result<u64, TryGetError>
where I: ColIdx,

§

impl<T> TryGetable for Option<T>
where T: TryGetable,

§

fn try_get_by<I>(res: &QueryResult, index: I) -> Result<Option<T>, TryGetError>
where I: ColIdx,

§

impl<T> TryGetable for Vec<T>
where T: TryGetableArray,

§

fn try_get_by<I>(res: &QueryResult, index: I) -> Result<Vec<T>, TryGetError>
where I: ColIdx,

Source§

impl<const N: usize> TryGetable for TypedId<N, u32>

Source§

fn try_get_by<I>( res: &QueryResult, index: I, ) -> Result<TypedId<N, u32>, TryGetError>
where I: ColIdx,

Source§

impl<const N: usize> TryGetable for TypedId<N, u64>

Source§

fn try_get_by<I>( res: &QueryResult, index: I, ) -> Result<TypedId<N, u64>, TryGetError>
where I: ColIdx,

Implementors§

§

impl TryGetable for BigDecimal

Available on crate feature with-bigdecimal only.
§

impl TryGetable for Braced

§

impl TryGetable for Date

§

impl TryGetable for DateTime<FixedOffset>

§

impl TryGetable for DateTime<Local>

§

impl TryGetable for DateTime<Utc>

§

impl TryGetable for Decimal

Available on crate feature with-rust_decimal only.
§

impl TryGetable for Hyphenated

§

impl TryGetable for NaiveDate

§

impl TryGetable for NaiveDateTime

§

impl TryGetable for NaiveTime

§

impl TryGetable for OffsetDateTime

§

impl TryGetable for PrimitiveDateTime

§

impl TryGetable for Simple

§

impl TryGetable for Time

§

impl TryGetable for Urn

§

impl TryGetable for Uuid

§

impl TryGetable for Value

§

impl<T> TryGetable for T

Available on crate feature with-json only.