pub trait PartialModelTrait: FromQueryResult {
// Required method
fn select_cols<S: SelectColumns>(select: S) -> S;
// Provided method
fn select_cols_nested<S: SelectColumns>(
select: S,
_prefix: Option<&str>,
) -> S { ... }
}Expand description
A trait for a part of Model
Required Methods§
Sourcefn select_cols<S: SelectColumns>(select: S) -> S
fn select_cols<S: SelectColumns>(select: S) -> S
Select specific columns this [PartialModel] needs
If you are implementing this by hand, please make sure to read the hints in the
documentation for select_cols_nested and ensure to implement both methods.
Provided Methods§
Sourcefn select_cols_nested<S: SelectColumns>(select: S, _prefix: Option<&str>) -> S
fn select_cols_nested<S: SelectColumns>(select: S, _prefix: Option<&str>) -> S
Used when nesting these structs into each other.
This will stop being a provided method in a future major release.
Please implement this method manually when implementing this trait by hand,
and ensure that your select_cols implementation is calling it with _prefix as None.
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.