Skip to main content

SortFieldOf

Trait SortFieldOf 

Source
pub trait SortFieldOf<M>: Sized
where M: Filterable,
{ // Required methods fn into_sort_field(self) -> <M as Filterable>::SortField; fn from_sort_field(field: <M as Filterable>::SortField) -> Self; }
Expand description

A sortable-fields enum mirroring model M’s, variant for variant.

The model’s derive provides From<T> for <M as Filterable>::SortField for every such T; the way back is SortFieldOf::from_sort_field, since the mirror cannot implement From for its own type from a projection either.

Required Methods§

Source

fn into_sort_field(self) -> <M as Filterable>::SortField

Convert into the model’s sort field.

Source

fn from_sort_field(field: <M as Filterable>::SortField) -> Self

Convert from the model’s sort field.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§