Trait SelectorTrait

pub trait SelectorTrait {
    type Item;

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

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>
where M: FromQueryResult,

§

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<T> SelectorTrait for SelectGetableTuple<T>
where T: TryGetableMany,

§

type Item = T

§

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

§

type Item = T