Trait Sortable

Source
pub trait Sortable<'s>: Sized {
    type Meta: Meta<'s, Self>;

    // Required method
    fn get_meta() -> Self::Meta;
}
Available on crate feature sort only.
Expand description

Something that can describe its sort orders.

This is the central trait of this module. Something that is Sortable can produce a Meta describing its sort orders. It has a derive macro which will automatically create all necessary supporting types using the markup on the type.

Required Associated Types§

Source

type Meta: Meta<'s, Self>

Meta is the type which can describe our fields and their operators.

Required Methods§

Source

fn get_meta() -> Self::Meta

get_meta produces an instance of our Meta type.

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.

Implementations on Foreign Types§

Source§

impl<'s, T> Sortable<'s> for Option<T>
where T: Sortable<'s>,

Source§

type Meta = OptionMeta

Source§

fn get_meta() -> Self::Meta

Source§

impl<'s, T> Sortable<'s> for Arc<T>
where T: Sortable<'s>,

Source§

type Meta = ArcMeta

Source§

fn get_meta() -> Self::Meta

Implementors§