Skip to main content

Builtin

Enum Builtin 

Source
pub enum Builtin {
Show 21 variants Container, Label, Button, Toggle, Slider, TextField, TextArea, Picker, Divider, Scroll, Image, Progress, Canvas, Nav, NavPage, NavMenu, Tabs, TabsPage, List, ListCell, Cover,
}
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.

§

Tabs

Native tabbed container (docs/tabs.md): NSTabView / GtkNotebook / QTabWidget / UITabBarController / Android tab strip. Holds TABS_PAGE children, one visible.

§

TabsPage

One tab’s content container inside a TABS host; its frame is native-owned.

§

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.

§

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).

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) -> Builtin

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 Debug for Builtin

Source§

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

Formats the value using the given formatter. Read more
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: &Builtin) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Builtin

Source§

impl Eq for Builtin

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 = 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.
Day API ↩ Guides· daybrite.dev