Skip to main content

ModelColumns

Trait ModelColumns 

Source
pub trait ModelColumns:
    Model
    + IntoExpr<Self>
    + Sized {
    // Provided methods
    fn table() -> Table<Self> { ... }
    fn detail() -> Detail<Self> { ... }
}
Expand description

The table and detail page a model reads as when its resource declares none: what a ResourceDef without a table lists and without a detail shows.

Derive it with ModelColumns, which gives a column to each field a person reads, whether a form or Toasty writes it. An impl that keeps the defaults here lists no column and turns the detail page off, for a resource that declares both.

Provided Methods§

Source

fn table() -> Table<Self>

The default table, which lists no column here.

Source

fn detail() -> Detail<Self>

The default detail page, which is off here.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§