Trait PartialModelTrait
pub trait PartialModelTrait: FromQueryResult {
// Required method
fn select_cols<S>(select: S) -> S
where S: SelectColumns;
// Provided method
fn select_cols_nested<S>(select: S, _prefix: Option<&str>) -> S
where S: SelectColumns { ... }
}
Expand description
A trait for a part of Model
Required Methods§
fn select_cols<S>(select: S) -> Swhere
S: SelectColumns,
fn select_cols<S>(select: S) -> Swhere
S: SelectColumns,
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§
fn select_cols_nested<S>(select: S, _prefix: Option<&str>) -> Swhere
S: SelectColumns,
fn select_cols_nested<S>(select: S, _prefix: Option<&str>) -> Swhere
S: SelectColumns,
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.