SelectorTrait

Trait SelectorTrait 

pub trait SelectorTrait {
    type Item: Sized;

    // Required method
    fn from_raw_query_result(res: QueryResult) -> Result<Self::Item, DbErr>;
}
Expand description

A Trait for any type that can perform SELECT queries

Required Associated Types§

type Item: Sized

Required Methods§

fn from_raw_query_result(res: QueryResult) -> Result<Self::Item, DbErr>

The method to perform a query on a Model

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.

Implementors§

§

impl<M> SelectorTrait for SelectModel<M>

§

type Item = M

§

impl<M, N> SelectorTrait for SelectTwoModel<M, N>

§

type Item = (M, Option<N>)

§

impl<M, N, O> SelectorTrait for SelectThreeModel<M, N, O>

§

type Item = (M, Option<N>, Option<O>)

§

impl<M, N, O, P> SelectorTrait for SelectFourModel<M, N, O, P>

§

type Item = (M, Option<N>, Option<O>, Option<P>)

§

impl<M, N, O, P, Q> SelectorTrait for SelectFiveModel<M, N, O, P, Q>

§

type Item = (M, Option<N>, Option<O>, Option<P>, Option<Q>)

§

impl<M, N, O, P, Q, R> SelectorTrait for SelectSixModel<M, N, O, P, Q, R>

§

type Item = (M, Option<N>, Option<O>, Option<P>, Option<Q>, Option<R>)

§

impl<T> SelectorTrait for SelectGetableTuple<T>
where T: TryGetableMany,

§

type Item = T

§

impl<T, C> SelectorTrait for SelectGetableValue<T, C>

§

type Item = T