Skip to main content

Builtin

Enum Builtin 

Source
pub enum Builtin {
Show 25 variants Container, Label, Button, Toggle, Slider, TextField, TextArea, Picker, Divider, Scroll, Image, Progress, Canvas, Nav, NavPage, NavMenu, List, ListCell, Tree, Cover, Inspector, InspectorPane, Split, SplitPane, ListItem,
}
Expand description

Every piece kind Day itself defines (§5.3). Backends match on this exhaustively in realize; anything outside it is an extension piece resolved through the Registry by its string PieceKind.

Variants§

§

Container

A dumb native panel (the column/row/stack backing).

§

Label

§

Button

§

Toggle

§

Slider

§

TextField

§

TextArea

A native multi-line text editor (docs/textarea.md). Built-in since 2026-07 (previously the satellite day-piece-textarea).

§

Picker

A native option picker with menu/segmented/inline stylings (docs/picker.md). Built-in since 2026-07 (previously the satellite day-piece-picker).

§

Divider

§

Scroll

§

Image

§

Progress

Progress indicator: determinate bar (fraction) or indeterminate spinner.

§

Canvas

§

Nav

Navigation host (docs/navigation.md): stack on mobile, split panes on desktop.

§

NavPage

One destination’s native container inside a NAV host.

§

NavMenu

Native navigation item list (docs/navigation.md): NSOutlineView source list / GtkListBox navigation-sidebar / QListWidget / UITableView rows with chevrons.

§

List

Native recycling list (docs/list.md): NSTableView / UITableView / RecyclerView / GtkListView / QListView. Owns scrolling + cell reuse; Day binds row content on demand.

§

ListCell

A recycled row’s content anchor inside a LIST; Day adopts the native cell as its handle. Adopted, never realized: Toolkit::adopt wraps the native cell, so backends’ realize never sees this kind.

§

Tree

Native hierarchical tree (docs/tree.md): NSOutlineView / sidebar collection list / GtkListView+TreeListModel / WinUI TreeView / ArkTS TreeView. Rows nest, disclose, and drag-to-reparent; Day binds row content on demand through Toolkit::attach_tree. Row cells are adopted (the same LIST_CELL anchor path as List).

§

Cover

A fullscreen cover (docs/cover.md): a modal surface presented over the whole window, edge-to-edge, driven by CoverPatch::{Present,Dismiss}. The handle is the cover’s content container; its frame is native-owned while presented (the backend sizes it to the safe area and reports it via Event::FrameChanged).

§

Inspector

Content beside a trailing inspector pane (docs/inspector.md): the native split whose second pane is a show/hidable properties panel. Exactly two INSPECTOR_PANE children: the content, then the panel (InspectorPaneProps::panel). Only realized where Cap::Inspector answers Native; everywhere else the inspector piece composes the pane from plain containers and this kind never reaches the backend.

§

InspectorPane

One pane’s container inside an INSPECTOR host: the NAV_PAGE of the inspector split. Its frame is native-owned (the splitter/dock sizes it), reported via Event::FrameChanged on this node; Day lays the pane’s content out inside it.

§

Split

Two panes with a divider the user drags (docs/split.md): the toolkit’s own splitter, side by side or stacked (SplitProps::axis), the first pane’s share bound to the app (SplitProps::fraction, reported back as Event::ValueChanged). Exactly two SPLIT_PANE children, first then second. Only realized where Cap::Split answers Native; everywhere else the split piece composes the panes and draws the divider itself, and this kind never reaches the backend.

§

SplitPane

One pane’s container inside a SPLIT host: native-owned frame (the splitter sizes it), reported via Event::FrameChanged on this node, like an INSPECTOR_PANE.

§

ListItem

A list row’s standard content (docs/list.md “List items”): a leading icon, a title, an optional subtitle and trailing detail, and a check mark, drawn the way the platform draws its own list rows: a UIListContentView with the cell’s default content configuration, a Material list item, an NSTableCellView’s image and text, a GTK row box. Only realized where Cap::ListItem answers Native; everywhere else the list_item piece composes the same content and this kind never reaches the backend.

Implementations§

Source§

impl Builtin

Source

pub const ALL: &'static [Builtin]

Every built-in, in declaration order (conformance tests iterate it).

Source

pub const fn key(self) -> PieceKind

This kind’s wire key: the same string as the matching kinds::* constant.

Source

pub fn from_key(kind: PieceKind) -> Option<Builtin>

The built-in this key names, or None for an extension piece’s kind.

Trait Implementations§

Source§

impl Clone for Builtin

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Builtin

Source§

impl Debug for Builtin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Builtin

Source§

impl Hash for Builtin

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Builtin

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Builtin

Auto Trait Implementations§

Blanket Implementations§

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> 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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.