Skip to main content

PersistedFields

Trait PersistedFields 

Source
pub trait PersistedFields {
    const FIELD_NAMES: &'static [&'static str];
}
Expand description

A type whose data names domain fields the persistence layer maps onto columns.

They are the fields a generated filter-options model filters on, a query model filters or sorts by, or a MergePatch model may write.

Implemented by the derives; the persistence layer checks at compile time that each field has a column before writing any SQL for the type’s data.

Required Associated Constants§

Source

const FIELD_NAMES: &'static [&'static str]

The domain fields, once each, in declaration order.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§