Skip to main content

tablo_core/
extend.rs

1//! The traits that add a new kind of building block to a declaration: a [`Column`] a table lists
2//! and a detail page shows, a [`Filter`] a table offers, a [`Control`] a
3//! [`Field::custom`](crate::Field::custom) field renders, an [`OptionSource`] a relationship
4//! choice loads its options from, a [`TypedValue`] a text field parses, a [`FilterDate`] a
5//! [`DateFilter`](crate::DateFilter) matches by day, a [`FilterKey`] a
6//! [`SelectFilter`](crate::SelectFilter) matches, a [`FilterNumber`] a
7//! [`NumberFilter`](crate::NumberFilter) compares, and a [`FilterText`] a
8//! [`TextFilter`](crate::TextFilter) matches. [`Includes`], [`FilterInput`],
9//! [`FilterValue`](crate::FilterValue), [`ControlFuture`] and [`ControlInput`] are what their
10//! methods take and return.
11//!
12//! The built-in columns and filters and the [`Toggle`](crate::Toggle) control implement these
13//! traits too, every [`Resource`](crate::Resource) is an [`OptionSource`], and the integer and
14//! float types, `bool`, `Uuid`, [`TenantId`](crate::TenantId), `jiff::Timestamp` and the
15//! `jiff::civil` `Date`, `Time` and `DateTime` are [`TypedValue`]s, as are
16//! `rust_decimal::Decimal` and `bigdecimal::BigDecimal` with the features of those names.
17
18pub use crate::{
19    column::{Column, Includes},
20    schema::{
21        fields::custom::{Control, ControlInput},
22        relationship::OptionSource,
23    },
24    table::filter::{
25        ControlFuture, Filter, FilterDate, FilterInput, FilterKey, FilterNumber, FilterText,
26    },
27    values::TypedValue,
28};