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§
Required Methods§
Sourcefn from_raw_query_result(res: QueryResult) -> Result<Self::Item, DbErr>
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.