Skip to main content

DataTableProps

Struct DataTableProps 

Source
pub struct DataTableProps {
Show 51 fields pub class: MaybeProp<String>, pub columns: Option<Vec<DataTableColumnDef>>, pub data_source: Option<DataTableSource>, pub paging: PagingMode, pub items: Option<RwSignal<Vec<DataTableRowModel>>>, pub edit_mode: EditMode, pub show_undo_toolbar: bool, pub features: DataTableFeatures, pub toolbar_config: DataTableToolbarConfig, pub header_chrome: DataTableHeaderChromeConfig, pub sortable: bool, pub resizable_columns: bool, pub column_groups: Option<Vec<DataTableColumnGroupDef>>, pub header_height: Option<f64>, pub height: Option<f64>, pub max_height: Option<f64>, pub flex: bool, pub auto_row_height: bool, pub locale: Option<DataTableLocale>, pub pagination_display: PaginationDisplayFormat, pub page_size_options: Option<Vec<u32>>, pub data_table_toolbar: Option<DataTableToolbarSlot>, pub data_table_toolbar_slot: Option<DataTableToolbarSlot>, pub data_table_footer: Option<DataTableFooterSlot>, pub data_table_footer_slot: Option<DataTableFooterSlot>, pub data_table_empty_view: Option<DataTableEmptyView>, pub data_table_no_results_view: Option<DataTableNoResultsView>, pub data_table_loading_view: Option<DataTableLoadingView>, pub loading: Option<RwSignal<bool>>, pub dir: Option<Direction>, pub get_row_class: Option<Callback<(DataTableRowModel, usize), String>>, pub get_row_id: Option<GetRowId>, pub get_tree_path: Option<GetTreePath>, pub row_grouping: Option<DataTableRowGrouping>, pub aggregation: Option<AggregationModel>, pub aggregation_position: AggregationPosition, pub pivot: Option<DataTablePivotModel>, pub list_view: Option<ListViewConfig>, pub data_table_row_detail: Option<DataTableRowDetail>, pub row_detail: Option<RowDetailView>, pub selection_mode: Option<DataTableSelectionMode>, pub initial_state: Option<DataTableInitialState>, pub sort: Option<Signal<Option<DataTableSort>>>, pub filter: Option<Signal<Option<DataTableFilter>>>, pub pagination: Option<Signal<Option<PaginationState>>>, pub selection: Option<Signal<Option<HashSet<String>>>>, pub server_fetch_policy: ServerFetchPolicy, pub data_table_events: DataTableEvents, pub events: Option<DataTableEvents>, pub on_handle: Option<Callback<DataTableHandle, ()>>, pub children: Option<Children>,
}
Expand description

Props for the DataTable component.

Presents sortable, filterable tabular data with built-in toolbar, selection, and pagination.

Bind columns and items (or data_source) to get a working table. Enable advanced capabilities via DataTableFeatures and tune toolbar/header chrome with DataTableToolbarConfig and DataTableHeaderChromeConfig. For static HTML tables without a data engine, use Table instead.

§When to use

  • Interactive grids over medium client-side datasets with sort, search, and pagination
  • Server-driven paging, sort, and filter via DataTableSource::Server
  • Admin views that need selection, editing, export, or grouping

§When to use Table instead

Use Table for static or lightly interactive content without a built-in data engine.

§Usage

  1. Define columns with DataTableColumnDef — see Column Definition.
  2. Supply rows via items or data_source.
  3. Enable feature flags on features as needed (pinning, virtualization, pivot, etc.).
  4. Customize toolbar and header chrome with toolbar_config and header_chrome without replacing slots.

§Best Practices

§Do’s

§Don’ts

  • Do not replace the entire toolbar when you only need to hide one control — use toolbar_config
  • Do not use raw HTML for toolbar/footer controls — the built-in chrome uses Orbital primitives

§DataTable topic guide

§Toolbar and header chrome

FieldTypeDefaultDescription
quick_searchbooltrueQuick-search field in the toolbar
filter_panelbooltrueStructured filter panel trigger
column_pickerbooltrueColumn visibility picker trigger
pivotbooltruePivot panel trigger (requires PIVOTING)
export_menubooltrueExport/print menu trigger

DataTableHeaderChromeConfig gates per-header menu, filter button, and hide-column UX. See Column Features for header chrome interaction with column menus.

§Examples

§Default data table

Sortable columns with quick search and pagination.

use crate::{DataTable, DataTableColumnDef, DataTableRowModel};
use std::collections::HashMap;
let items = RwSignal::new(vec![
    DataTableRowModel::from_text_cells("1", HashMap::from([("name".into(), "Ada".into()), ("role".into(), "Admin".into())])),
    DataTableRowModel::from_text_cells("2", HashMap::from([("name".into(), "Grace".into()), ("role".into(), "Editor".into())])),
]);
view! {
    <div data-testid="data-table-preview">
        <DataTable
            sortable=true
            columns=vec![
                DataTableColumnDef::new("name", "Name"),
                DataTableColumnDef::new("role", "Role"),
            ]
            items=items
        />
    </div>
}

§Row selection

Multiselect with checkboxes.

use crate::{DataTable, DataTableColumnDef, DataTableRowModel, DataTableSelectionMode};
use std::collections::HashMap;
let items = RwSignal::new(vec![
    DataTableRowModel::from_text_cells("a", HashMap::from([("name".into(), "Alpha".into())])),
    DataTableRowModel::from_text_cells("b", HashMap::from([("name".into(), "Beta".into())])),
]);
view! {
    <div data-testid="data-table-selection">
        <DataTable
            selection_mode=DataTableSelectionMode::Multiselect
            columns=vec![DataTableColumnDef::new("name", "Name")]
            items=items
        />
    </div>
}

§Density variants

Row and header heights respond to theme density.

use crate::{DataTable, DataTableColumnDef, DataTableRowModel};
use orbital_core_components::{Flex, FlexGap, ThemeDensityStepper};
use std::collections::HashMap;
let items = RwSignal::new(vec![
    DataTableRowModel::from_text_cells("1", HashMap::from([("name".into(), "Ada".into())])),
]);
view! {
    <div data-testid="data-table-density">
        <Flex vertical=true gap=FlexGap::Medium>
            <ThemeDensityStepper />
            <DataTable
                columns=vec![DataTableColumnDef::new("name", "Name")]
                items=items
            />
        </Flex>
    </div>
}

§Layout

Fixed height and flex-fill in a bounded parent.

use std::collections::HashMap;
use crate::{DataTable, DataTableColumnDef, DataTableRowModel, PagingMode};
let items = RwSignal::new((0..30).map(|i| {
    DataTableRowModel::from_text_cells(&i.to_string(), HashMap::from([("name".into(), format!("Row {i}"))]))
}).collect::<Vec<_>>());
view! {
    <div data-testid="data-table-layout-preview" style="display: flex; flex-direction: column; height: 350px;">
        <DataTable
            flex=true
            max_height=280.0
            paging=PagingMode::None
            columns=vec![DataTableColumnDef::new("name", "Name")]
            items=items
        />
    </div>
}

§Custom slots

Replace toolbar, footer, and empty views with custom content via Leptos slot children.

use std::collections::HashMap;
use crate::{
    DataTable, DataTableColumnDef, DataTableEmptyView, DataTableFooterSlot,
    DataTableRowModel, DataTableToolbarSlot, PagingMode,
};
use orbital_core_components::{Toolbar, ToolbarButton};
let empty: RwSignal<Vec<DataTableRowModel>> = RwSignal::new(vec![]);
view! {
    <div data-testid="data-table-slots-preview">
        <DataTable
            paging=PagingMode::None
            max_height=200.0
            columns=vec![DataTableColumnDef::new("name", "Name")]
            items=empty
        >
            <DataTableToolbarSlot slot>
                <div data-testid="custom-toolbar">
                    <Toolbar><ToolbarButton>"Custom toolbar"</ToolbarButton></Toolbar>
                </div>
            </DataTableToolbarSlot>
            <DataTableFooterSlot slot>
                <div data-testid="custom-footer">"Custom footer"</div>
            </DataTableFooterSlot>
            <DataTableEmptyView slot>
                <div data-testid="custom-empty">"No data yet"</div>
            </DataTableEmptyView>
        </DataTable>
    </div>
}

§Toolbar and header chrome

Toggle built-in toolbar controls and column-header actions without replacing the whole toolbar.

use std::collections::HashMap;
use crate::{
    DataTable, DataTableColumnDef, DataTableHeaderChromeConfig, DataTableRowModel,
    DataTableToolbarConfig, PagingMode,
};
let items = RwSignal::new(vec![
    DataTableRowModel::from_text_cells("1", HashMap::from([("name".into(), "Ada".into())])),
]);
view! {
    <div data-testid="data-table-chrome-config-preview">
        <DataTable
            paging=PagingMode::None
            max_height=200.0
            toolbar_config=DataTableToolbarConfig {
                quick_search: true,
                filter_panel: false,
                column_picker: false,
                pivot: false,
                export_menu: true,
            }
            header_chrome=DataTableHeaderChromeConfig {
                column_menu: false,
                column_filter_button: false,
                column_hide: false,
            }
            columns=vec![DataTableColumnDef::new("name", "Name")]
            items=items
        />
    </div>
}

§Optional Props

Fields§

§class: MaybeProp<String>

Extra CSS class names merged onto the root element.

§columns: Option<Vec<DataTableColumnDef>>

Column definitions (bind to dataset schema field keys).

§data_source: Option<DataTableSource>

Unified data source (client signal or server fetcher).

§paging: PagingMode

Pagination presentation (Paged, InfiniteScroll, or None).

§items: Option<RwSignal<Vec<DataTableRowModel>>>

Reactive row data (sugar for DataTableSource::Client when data_source is omitted).

§edit_mode: EditMode

Inline edit scope: single cell or whole row.

§show_undo_toolbar: bool

Show undo/redo toolbar (typically enabled in undo preview).

§features: DataTableFeatures

Opt-in capability flags.

§toolbar_config: DataTableToolbarConfig

Built-in toolbar control visibility (ignored when a custom toolbar slot is provided).

§header_chrome: DataTableHeaderChromeConfig

Column header chrome visibility (menu, filter button, hide-column UX).

§sortable: bool

Enable column header sorting.

§resizable_columns: bool

Enable drag resize on column headers.

§column_groups: Option<Vec<DataTableColumnGroupDef>>

Optional nested column groups for multi-row headers.

§header_height: Option<f64>

Optional override for header row height in pixels.

§height: Option<f64>

Fixed height for the scroll body in pixels (enables vertical scroll).

§max_height: Option<f64>

Optional max height for the scroll body (enables vertical scroll).

§flex: bool

Fill available height in a flex parent (flex: 1; min-height: 0).

§auto_row_height: bool

Allow rows to grow taller than the density-mapped minimum height.

§locale: Option<DataTableLocale>

Localized UI strings (footer, overlays, search placeholder).

§pagination_display: PaginationDisplayFormat

Footer pagination label format (Locale range vs legacy Plain count).

§page_size_options: Option<Vec<u32>>

Rows-per-page options for footer Select (None hides the selector).

§data_table_toolbar: Option<DataTableToolbarSlot>

Custom toolbar — nest with <DataTableToolbarSlot slot>.

§data_table_toolbar_slot: Option<DataTableToolbarSlot>

Deprecated — use [data_table_toolbar].

§data_table_footer: Option<DataTableFooterSlot>

Custom footer — nest with <DataTableFooterSlot slot>.

§data_table_footer_slot: Option<DataTableFooterSlot>

Deprecated — use [data_table_footer].

§data_table_empty_view: Option<DataTableEmptyView>

Custom empty-state overlay — nest with <DataTableEmptyView slot>.

§data_table_no_results_view: Option<DataTableNoResultsView>

Custom no-results overlay — nest with <DataTableNoResultsView slot>.

§data_table_loading_view: Option<DataTableLoadingView>

Custom loading overlay — nest with <DataTableLoadingView slot>.

§loading: Option<RwSignal<bool>>

Client-controlled loading state for overlay display.

§dir: Option<Direction>

Text direction override (defaults to theme direction).

§get_row_class: Option<Callback<(DataTableRowModel, usize), String>>

Per-row CSS class callback.

§get_row_id: Option<GetRowId>

Custom row id resolver (default: [DataRecord::id]).

§get_tree_path: Option<GetTreePath>

Hierarchical path resolver for tree data (TREE_DATA).

§row_grouping: Option<DataTableRowGrouping>

Row grouping model (ROW_GROUPING).

§aggregation: Option<AggregationModel>

Aggregation rules for footer/group summaries (AGGREGATION).

§aggregation_position: AggregationPosition

Where aggregate values render (footer or inline on groups).

§pivot: Option<DataTablePivotModel>

Pivot configuration (PIVOTING).

§list_view: Option<ListViewConfig>

List view card layout config (LIST_VIEW).

§data_table_row_detail: Option<DataTableRowDetail>

Custom row detail panel — nest with <DataTableRowDetail slot render=... />.

§row_detail: Option<RowDetailView>

Deprecated — use DataTableRowDetail slot or [data_table_row_detail].

§selection_mode: Option<DataTableSelectionMode>

Row selection mode (Single or Multiselect).

§initial_state: Option<DataTableInitialState>

One-time initial state (sort, search, pagination, selection).

§sort: Option<Signal<Option<DataTableSort>>>

Controlled sort model (None = uncontrolled).

§filter: Option<Signal<Option<DataTableFilter>>>

Controlled filter model (None = uncontrolled).

§pagination: Option<Signal<Option<PaginationState>>>

Controlled pagination (None = uncontrolled).

§selection: Option<Signal<Option<HashSet<String>>>>

Controlled selection ids (None = uncontrolled).

§server_fetch_policy: ServerFetchPolicy

Server fetch invalidation: drop stale in-flight responses; optional ServerFetchPolicy::dedupe_key.

§data_table_events: DataTableEvents

Side-effect callbacks for table integration.

§events: Option<DataTableEvents>

Deprecated — prefer [data_table_events].

§on_handle: Option<Callback<DataTableHandle, ()>>

Deprecated — prefer data_table_events.on_handle.

§children: Option<Children>

Additional children (provider context, etc.).

Implementations§

Source§

impl DataTableProps

Source

pub fn builder() -> DataTablePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>

Create a builder for building DataTableProps. On the builder, call .class(...)(optional), .columns(...)(optional), .data_source(...)(optional), .paging(...)(optional), .items(...)(optional), .edit_mode(...)(optional), .show_undo_toolbar(...)(optional), .features(...)(optional), .toolbar_config(...)(optional), .header_chrome(...)(optional), .sortable(...)(optional), .resizable_columns(...)(optional), .column_groups(...)(optional), .header_height(...)(optional), .height(...)(optional), .max_height(...)(optional), .flex(...)(optional), .auto_row_height(...)(optional), .locale(...)(optional), .pagination_display(...)(optional), .page_size_options(...)(optional), .data_table_toolbar(...)(optional), .data_table_toolbar_slot(...)(optional), .data_table_footer(...)(optional), .data_table_footer_slot(...)(optional), .data_table_empty_view(...)(optional), .data_table_no_results_view(...)(optional), .data_table_loading_view(...)(optional), .loading(...)(optional), .dir(...)(optional), .get_row_class(...)(optional), .get_row_id(...)(optional), .get_tree_path(...)(optional), .row_grouping(...)(optional), .aggregation(...)(optional), .aggregation_position(...)(optional), .pivot(...)(optional), .list_view(...)(optional), .data_table_row_detail(...)(optional), .row_detail(...)(optional), .selection_mode(...)(optional), .initial_state(...)(optional), .sort(...)(optional), .filter(...)(optional), .pagination(...)(optional), .selection(...)(optional), .server_fetch_policy(...)(optional), .data_table_events(...)(optional), .events(...)(optional), .on_handle(...)(optional), .children(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of DataTableProps.

Trait Implementations§

Source§

impl Props for DataTableProps

Source§

type Builder = DataTablePropsBuilder

Source§

fn builder() -> Self::Builder

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for El
where El: IntoElementMaybeSignalType<T, Marker>,

Source§

impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
where T: From<Js> + Clone,

Source§

impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for El
where El: IntoElementsMaybeSignalType<T, Marker>,

Source§

impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
where T: From<Js> + Clone,

Source§

impl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

Source§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
Source§

impl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

Source§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
Source§

impl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

Source§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> SerializableKey for T

Source§

fn ser_key(&self) -> String

Serializes the key to a unique string. Read more
Source§

impl<T> StorageAccess<T> for T

Source§

fn as_borrowed(&self) -> &T

Borrows the value.
Source§

fn into_taken(self) -> T

Takes the value.
Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more