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§
- Control
Input - What a
Controlrenders for one form: the field’s key, its DOM id, its current value, and its validation state. - Filter
Input - What a
Filter::controlrenders for one request. - Includes
- The relations a
Columnreads off its row.
Traits§
- Column
- One column of a table or a
Detaildeclares 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 aColumninstead. - Filter
- One table filter declares a control and its predicate.
- Filter
Date - A field type a
DateFiltermatches by calendar day:jiff::Timestamp(the day in the request’stime_zone),jiff::civil::Date,jiff::civil::DateTime, and anOptionof any of them. - Filter
Key - A field type a
SelectFiltermatches: one the form parses that compares as itself, such as a foreign key’s. - Filter
Number - A field type a
NumberFiltercompares: the integer types up to 64 bits,f32andf64, and anOptionof one. - Filter
Text - A field type a
TextFiltermatches:StringandOption<String>. - Option
Source - Describes the source a relationship option loader reads.
- Typed
Value - Parses a typed column’s text submission and names the type in the error it produces.
Type Aliases§
- Control
Future - What
Filter::load_controlreturns: the control, once what it offers has loaded.