TryGetable

Trait TryGetable 

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§

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§

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", so this trait is not object safe.

Implementations on Foreign Types§

§

impl TryGetable for bool

§

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

§

impl TryGetable for f32

§

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

§

impl TryGetable for f64

§

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

§

impl TryGetable for i8

§

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

§

impl TryGetable for i16

§

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

§

impl TryGetable for i32

§

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

§

impl TryGetable for i64

§

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

§

impl TryGetable for u8

§

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

§

impl TryGetable for u16

§

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

§

impl TryGetable for u32

§

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

§

impl TryGetable for u64

§

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

§

impl TryGetable for DateTime<FixedOffset>

§

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

§

impl TryGetable for DateTime<Local>

§

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

§

impl TryGetable for DateTime<Utc>

§

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

§

impl TryGetable for Braced

§

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

§

impl TryGetable for Hyphenated

§

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

§

impl TryGetable for Simple

§

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

§

impl TryGetable for Urn

§

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

§

impl TryGetable for String

§

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

§

impl TryGetable for Vec<Value>

§

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

§

impl TryGetable for Vec<bool>

§

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

§

impl TryGetable for Vec<f32>

§

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

§

impl TryGetable for Vec<f64>

§

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

§

impl TryGetable for Vec<i8>

§

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

§

impl TryGetable for Vec<i16>

§

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

§

impl TryGetable for Vec<i32>

§

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

§

impl TryGetable for Vec<i64>

§

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

§

impl TryGetable for Vec<u8>

§

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

§

impl TryGetable for Vec<u32>

§

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

§

impl TryGetable for Vec<DateTime<FixedOffset>>

§

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

§

impl TryGetable for Vec<DateTime<Local>>

§

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

§

impl TryGetable for Vec<DateTime<Utc>>

§

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

§

impl TryGetable for Vec<Braced>

§

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

§

impl TryGetable for Vec<Hyphenated>

§

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

§

impl TryGetable for Vec<Simple>

§

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

§

impl TryGetable for Vec<Urn>

§

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

§

impl TryGetable for Vec<NaiveDate>

§

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

§

impl TryGetable for Vec<NaiveDateTime>

§

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

§

impl TryGetable for Vec<Decimal>

§

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

§

impl TryGetable for Vec<NaiveTime>

§

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

§

impl TryGetable for Vec<Date>

§

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

§

impl TryGetable for Vec<PrimitiveDateTime>

§

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

§

impl TryGetable for Vec<OffsetDateTime>

§

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

§

impl TryGetable for Vec<Time>

§

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

§

impl TryGetable for Vec<Uuid>

§

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

§

impl TryGetable for Vec<String>

§

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

§

impl TryGetable for Vec<Vec<u8>>

§

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

§

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

§

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

§

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 NaiveTime

§

impl TryGetable for Date

§

impl TryGetable for PrimitiveDateTime

§

impl TryGetable for OffsetDateTime

§

impl TryGetable for Time

§

impl TryGetable for Uuid

§

impl TryGetable for ChronoUnixTimestamp

§

impl TryGetable for ChronoUnixTimestampMillis

§

impl TryGetable for TextUuid

§

impl TryGetable for TimeUnixTimestamp

§

impl TryGetable for TimeUnixTimestampMillis

§

impl<T> TryGetable for T

Available on crate feature with-json only.