Skip to main content

Module extend

Module extend 

Source
Expand description

The traits that add a new kind of building block to a declaration: a Column a table lists and a detail page shows, a Filter a table offers, a Control a Field::custom field renders, an OptionSource a relationship choice loads its options from, a TypedValue a text field parses, a FilterDate a DateFilter matches by day, a FilterKey a SelectFilter matches, a FilterNumber a NumberFilter compares, and a FilterText a TextFilter matches. Includes, FilterInput, FilterValue, ControlFuture and ControlInput are what their methods take and return.

The built-in columns and filters and the Toggle control implement these traits too, every Resource is an OptionSource, and the integer and float types, bool, Uuid, TenantId, jiff::Timestamp and the jiff::civil Date, Time and DateTime are TypedValues, as are rust_decimal::Decimal and bigdecimal::BigDecimal with the features of those names.

Structs§

ControlInput
What a Control renders for one form: the field’s key, its DOM id, its current value, and its validation state.
FilterInput
What a Filter::control renders for one request.
Includes
The relations a Column reads off its row.

Traits§

Column
One column of a table or a Detail declares its label, its value read off the record, and its query predicates.
Control
Renders a field’s input from a ControlInput, using a hidden field for a state that submits nothing. A detail page shows the value through a Column instead.
Filter
One table filter declares a control and its predicate.
FilterDate
A field type a DateFilter matches by calendar day: jiff::Timestamp (the day in the request’s time_zone), jiff::civil::Date, jiff::civil::DateTime, and an Option of any of them.
FilterKey
A field type a SelectFilter matches: one the form parses that compares as itself, such as a foreign key’s.
FilterNumber
A field type a NumberFilter compares: the integer types up to 64 bits, f32 and f64, and an Option of one.
FilterText
A field type a TextFilter matches: String and Option<String>.
OptionSource
Describes the source a relationship option loader reads.
TypedValue
Parses a typed column’s text submission and names the type in the error it produces.

Type Aliases§

ControlFuture
What Filter::load_control returns: the control, once what it offers has loaded.