Expand description
Facade crate: the public frust framework API.
App authors depend on this single crate. It exposes run, the canonical
app entry point, and curates the view/widget/reactive
vocabulary from the underlying framework crates so the declarative call
shape reads exactly as the spec promises:
use frust::{Component, View, column, text};
#[derive(Default)]
struct Counter;
impl Component for Counter {
type State = i32;
fn init(&self) -> i32 {
0
}
// The whole UI is one declarative tree in `build`; helpers that keep it
// shallow are `Self::` associated fns in a separate inherent impl.
fn build(&self, state: &mut i32) -> impl View<i32> {
column()
.child(Self::greeting("Hello from Frust"))
.child(text(format!("count: {state}")).size(32.0))
}
}
impl Counter {
fn greeting(message: &str) -> impl View<i32> {
text(message.to_owned()).size(24.0)
}
}
frust::app!(Counter);The composition rule: stateless pieces are Self:: helper fns (or widget
fns) called from build; a piece with its own state is a child Component mounted
with component, which gives it a private state boundary. run (or
the app! macro, which also covers the mobile and web shells) starts it.
§Low-level escape hatch: App::new
App is the low-level primitive run and app! expand into
(App::new(state, move |state| AnyView::new(root.build(state)))): a single ambient
State and a build closure, with no Component state-boundary or
retained local state. Ordinary apps use a Component with run or
app!; reach for App::new directly only when you need that raw
(state, build) pair:
use frust::text;
struct AppState {
greeting: String,
}
// The build closure is generic over its return (`impl View<State>`), so it
// returns the concrete view directly, with no erasure.
let build = |state: &mut AppState| text(state.greeting.clone()).size(32.0);
frust::App::new(AppState { greeting: "Hello from Frust".into() }, build)
.run()
.unwrap();§Layout containers
The fluent column() / row() builders take each child as-is (they erase
internally); the tuple-style primitives take a tuple of mixed view types
(up to 12, nest beyond), so no any is written:
use frust::{
Align, Alignment, Column, Component, EdgeInsets, Padding, Row, SizedBox, View, text,
};
#[derive(Default)]
struct Layouts;
impl Component for Layouts {
type State = ();
fn init(&self) {}
fn build(&self, _state: &mut ()) -> impl View<()> {
Column((
text("title").size(24.0),
Row((text("left"), text("right"))),
Padding(EdgeInsets::all(8.0), text("padded")),
Align(Alignment::CENTER, text("centered")),
SizedBox(Some(0.0), Some(12.0)),
))
}
}The fluent builders also express conditional and iterated children
(.when, .children) without any erasure:
use frust::{column, row, stack, text};
let _overlay = stack::<()>().child(text("base")).child(text("badge"));
let _line = row::<()>().children(["a", "b"].map(text));
column()
.child(text("a"))
.flex(1, text("b"))
.when(cond, |c| c.child(text("c")))Re-exports§
Modules§
- authoring
- Everything needed to author a custom
View/Widgetpair. - drag
- The
dragmodule: drop targets, draggable sources, auto-scroll zones, and reorderable lists, all coordinated through a single ambientDragCoordinator. Re-exported wholesale (pub use frust_widgets::drag;), mirroringfrust_widgets::icons’s andmotion’s existing wholesale-module precedent, so later types underfrust_widgets::dragride along underfrust::drag::*with no further facade edits. - draggable
draggable(): the drag source — a transparent wrapper that turns a press on its child into aDragCoordinatorsession, floats a ghost that follows the pointer, and marks the source while the drag is in flight.- either
- Statically-typed branching views: the two-arm
Eitherwith its lazyeitherhelper, and the three-to-eight-armEitherOf3..EitherOf8. - icons
- The vendored Material Symbols starter icon set,
flat-re-exported so app code names
frust::icons::HOMErather than the underlyingfrust-widgetscrate. Each entry is anIconSourceusable directly withicon; an app can also supply its own vector icons viaIconData::from_path. Vendored Material Symbols starter set — GENERATED, do not hand-edit. - input
- Pure input/gesture helpers (slop constants,
input::VelocityTracker, the fling-decay math) re-exported for app authors and advanced widgets. - motion
- The
motionmodule: declarative implicit-animation wrappers (AnimatedOpacity/AnimatedScaletoday;switcher/patternsland later) overfrust-core’sanimvocabulary. Re-exported wholesale (pub use frust_widgets::motion;), mirroringfrust_widgets::icons’s existing wholesale-module precedent — the only other one in this facade — so later types underfrust_widgets::motionride along underfrust::motion::*with no further facade edits (see that module’s own docs for the full rationale).
Macros§
- android_
app - Bind a generated app’s
State/buildto the fixed Android JNI exports (a Makepadapp_main!precedent). - app
- The canonical app entry point: one line binds a root
Componentto all three platforms. - ios_app
- Bind a generated app’s
State/buildto the fixed iOS C-ABI exports (Makepadapp_main!precedent). - web_app
- The browser counterpart of
android_app!/ios_app!: binds aComponent’s state and build closure to the browser shell’s wasm-bindgen entry point. Takes the identical two-argument (state type + build expression, state built viaDefault) / three-argument (state type + explicit state-init expression + build expression) shapeandroid_app!does, andapp!drives it through the three-argument form exactly the way it drivesandroid_app!/ios_app!(see@emit_mobilebelow) — most apps reach this throughapp!/web_app!rather than hand-writing the explicitstate_initform.
Structs§
- Align
View - A declarative alignment container. See the module docs.
- Alignment
- A relative alignment within a box: each axis runs
-1.0(start) through0.0(center) to1.0(end). - Always
Scrollable - Flutter’s
AlwaysScrollableScrollPhysics: accept a drag whether or not there is anything to scroll, and defer everything else to the chained parent. - Animate
To - The duration/curve
ScrollController::animate_toeases a programmatic scroll through. Both fields are required rather than defaulted — Flutter’sScrollController.animateTokeepsduration/curverequired for the same reason: an app names the motion it wants rather than inheriting a guessed one. - Animation
Controller - The animation vocabulary: the shell-fed frame clock (
FrameTime) plus the pure easing/interpolation/spring math a widget or app advances it through, flat-re-exported fromfrust-core::anim. Time enters from the shell during paint (PaintCtx::frame_time); nothing here reads a clock. A0.0..=1.0animation value driven either by a duration +Curveor by aSpringfling. - AnyView
- A type-erased
View: lets a piece of UI change its concrete view type between frames (e.g. a conditionalif cond { text(..) } else { button(..) }) while still fitting the statically-typed rebuild machinery. - App
- A Frust application: the app state plus the
buildclosure that maps it to a view tree. - Auto
Scroll - How an
auto_scroll_zone()scrolls: the edge band’s depth and the speed at the edge. - Auto
Scroll Zone - A declarative auto-scroll wrapper. See the module docs.
- Auto
Scroll Zone Widget - The retained widget for an
AutoScrollZone. - Back
Handler - Android back-press ⇄ navigator auto-wiring:
attach_back_handler/BackHandlerpop aNavigatorControlleron a platform back press and keepfrust-reactive‘shandles_backflag in sync with the stack depth, so a shell knows whether a root-level back should fall through to the platform (activity finish). MirrorsRouterDeepLinks’s shape and, like it, is the ONLY place in the facade that sees bothfrust-widgets’NavigatorControllerandfrust-reactive’s back-press source together — seeBackHandler’s doc for the consume/dedupe and timing contracts. CallBackHandler::trackfrom everyComponent::build. Android back-press ⇄ navigator auto-wiring:attach_back_handler/BackHandlerpop aNavigatorControlleron a platform back press and keepfrust-reactive‘shandles_backflag in sync with the stack depth, so a shell knows whether a root-level back should fall through to the platform (activity finish). MirrorsRouterDeepLinks’s shape and, like it, is the ONLY place in the facade that sees bothfrust-widgets’NavigatorControllerandfrust-reactive’s back-press source together — seeBackHandler’s doc for the consume/dedupe and timing contracts. CallBackHandler::trackfrom everyComponent::build. Android back-press ⇄ navigator auto-wiring:attach_back_handler/BackHandlerpop aNavigatorControlleron a platform back press and keepfrust-reactive‘shandles_backflag in sync with the stack depth, so a shell knows whether a root-level back should fall through to the platform (activity finish). MirrorsRouterDeepLinks’s shape and, like it, is the ONLY place in the facade that sees bothfrust-widgets’NavigatorControllerandfrust-reactive’s back-press source together — seeBackHandler’s doc for the consume/dedupe and timing contracts. CallBackHandler::trackfrom everyComponent::build. ANavigatorControllerwired to the process-wide back-press source (see the module docs) — the explicit back-wiring surface predating the automaticnavigatorauto-wiring. - Back
Presses - The Android back-press source (
frust-reactive’s process-wide back source — see itsbackmodule docs). A mobile shell delivers a hardware/gesture back press viapush_back_press, and the facade’sBackHandlerreads it viaback_pressesto pop a navigator;set_handles_back/handles_backare the “framework consumes the next back” flag a shell polls to decide whether a root-level back falls through to the platform. App code normally usesattach_back_handlerrather than these directly;push_back_pressis also the desktop dev seam (no shell writes on desktop yet). The app-facing back-press read surface (see the module docs). Obtained viaback_presses(frust::back_presses()at the facade). - Bouncing
- iOS’s scroll feel — Flutter’s
BouncingScrollPhysics: a drag may pull the position past an edge against a friction factor that tightens with depth, nothing is ever boundary-rejected, and a release runs an exponential friction curve that hands over to a rubber-band spring at whichever edge it reaches. - Button
View - A declarative pressable button. See the module docs.
- Canvas
View - Declarative custom painting over the [
PaintScene] trait object — a chart, a node-and-edge graph, a game board — without hand-rolling aView/Widgetpair.canvastakes a paint closure that runs in local space (the widget’s own top-left is always(0, 0), and painting past its own size is clipped, never a bug to chase) — flat-re-exported fromfrust-widgetsso app code never names that crate directly. SeeCanvasView’s own doc for the full builder contract (.size/.expandsizing,.on_hit-gated.on_tap/.on_pointer, and.repaint_keyfor paint-only dirtying driven by data outside the ordinaryViewdiff). - Canvas
Widget - Declarative custom painting over the [
PaintScene] trait object — a chart, a node-and-edge graph, a game board — without hand-rolling aView/Widgetpair.canvastakes a paint closure that runs in local space (the widget’s own top-left is always(0, 0), and painting past its own size is clipped, never a bug to chase) — flat-re-exported fromfrust-widgetsso app code never names that crate directly. SeeCanvasView’s own doc for the full builder contract (.size/.expandsizing,.on_hit-gated.on_tap/.on_pointer, and.repaint_keyfor paint-only dirtying driven by data outside the ordinaryViewdiff). - Checkbox
View - A declarative checkbox. See the module docs.
- Child
Key - A stable identity for a list child, so a container’s reconciliation can match a child to its live widget by key across reorders/inserts instead of by position — the difference between “the third row’s widget” and “row #42’s widget” when the list is shuffled.
- Clamping
- Android’s scroll feel — Flutter’s
ClampingScrollPhysics: a drag never leaves the range (the excess is rejected outright, for the surface to show as a stretch or a glow instead), and a release runs Android’s ownSplineOverScrollerdeceleration to a hard stop. - Color
Scheme - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Component
View - The
Viewadapter that hosts aComponentin any surrounding view tree. - Container
View - A declarative decorated box. See the module docs.
- Container
Widget - The retained widget for a
ContainerView. See the module docs. - Cosmetic
Loop Rate - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Deep
Link - The deep-link read surface (
frust-reactive’sapp_links- style process-wide source — see its module docs for the semantics): a mobile shell delivers a platform link viafrust-reactive’spush_deep_link, and app code reads it here —deep_links()returns aDeepLinkssnapshot (DeepLinks::initial) plus the live, trackableDeepLinks::latestsignal aComponent::buildreads to react to cold-start and subsequent links uniformly. Router auto-wiring (resolvingdeep_links()against aRouter) is a separate opt-in, not automatic here. - Deep
Links - The deep-link read surface (
frust-reactive’sapp_links- style process-wide source — see its module docs for the semantics): a mobile shell delivers a platform link viafrust-reactive’spush_deep_link, and app code reads it here —deep_links()returns aDeepLinkssnapshot (DeepLinks::initial) plus the live, trackableDeepLinks::latestsignal aComponent::buildreads to react to cold-start and subsequent links uniformly. Router auto-wiring (resolvingdeep_links()against aRouter) is a separate opt-in, not automatic here. - Desktop
Config - The desktop app’s identity and native-integration vocabulary, re-exported
from the desktop core so app code never names a shell crate:
DesktopConfig(the whole declaration — app name, reverse-DNS id, window icon, menu bar, last-window-close policy — handed toApp::desktop,run_desktop_configorapp!’sdesktop = { .. }argument),MenuSpec/MenuItemSpec/MenuRole(the platform-independent native menu tree a per-OS shell translates into an NSApp menu bar or anHMENU),DesktopIconData(decoded, tightly-packed RGBA8 — decoding a PNG/ICO/ICNS is the caller’s job), andDEFAULT_APP_NAME(the window title a config that names nothing still gets). - Desktop
Icon Data - The desktop app’s identity and native-integration vocabulary, re-exported
from the desktop core so app code never names a shell crate:
DesktopConfig(the whole declaration — app name, reverse-DNS id, window icon, menu bar, last-window-close policy — handed toApp::desktop,run_desktop_configorapp!’sdesktop = { .. }argument),MenuSpec/MenuItemSpec/MenuRole(the platform-independent native menu tree a per-OS shell translates into an NSApp menu bar or anHMENU),DesktopIconData(decoded, tightly-packed RGBA8 — decoding a PNG/ICO/ICNS is the caller’s job), andDEFAULT_APP_NAME(the window title a config that names nothing still gets). - Divider
View - A declarative hairline separator. See the module docs.
- Divider
Widget - The retained widget for a
DividerView. See the module docs. - Drag
Coordinator - A cloneable handle onto one drag scope’s session state: sources
arm/begina drag and report its pointer withupdate_pointer, which resolves the hovered target against the registry (set_hoveredoverrides it), and it ends indrop+complete_droporcancel. Every clone shares one state. See the module docs for the transition rules. - Drag
Session - A snapshot of an in-flight (
Dragging/Dropping) session, minus the payload itself. - Drag
Source Id - Identity of a draggable source, allocated by
DragCoordinator::new_source_idand unique within that coordinator. - Drag
Subscription - The guard
DragCoordinator::subscribereturns: dropping it unsubscribes the listener. Holds the coordinator weakly, so it never keeps it alive. - Drag
Target Id - Identity of a drop target, allocated by
DragCoordinator::new_target_idand unique within that coordinator. - Drag
Target View - A declarative drop target. See the module docs.
- Drag
Target Widget - The retained widget for a
DragTargetView. - Draggable
View - A declarative drag source. See the module docs.
- Draggable
Widget - The retained widget for a
DraggableView. - Easing
Set - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Edge
Insets - Per-edge inset amounts, in logical pixels.
- Elevation
- The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Elevation
Level - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - File
Drop Event - The file-drop vocabulary for handling file drops from the OS.
[
InputEvent::FileDrop] carries aFileDropEvent, which embeds aFileDropPhase(Hover,Drop,Cancel, or the broadcast-onlyEndedthat follows everyDrop/Cancel) and the dropped file paths (only onDrop). A widget handling drops is hit-tested and bubbles likeInputEvent::Scroll. Lifted flat for the same reasonEditCommandis: an app’s file-drop handler names these types in its public API without being a widget author. A desktop OS file drag/drop event — hit-tested and bubbling exactly likeInputEvent::Scroll, byposition, so acrate::widget::ChildPodcontainer routes it with no change of its own (seeInputEvent::translated/InputEvent::transformed). - Flex
Child - One child of a
FlexView: an erased child view, itsflexfactor (0= inflexible;> 0= takes a proportional share of the free main space), and an optionalChildKeyfor keyed reconciliation. - Flex
View - A declarative flex container. See the module docs.
- Font
Face - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Frame
Time - The animation vocabulary: the shell-fed frame clock (
FrameTime) plus the pure easing/interpolation/spring math a widget or app advances it through, flat-re-exported fromfrust-core::anim. Time enters from the shell during paint (PaintCtx::frame_time); nothing here reads a clock. A point in time supplied by the shell, in monotonic nanoseconds. - Gesture
Detector View - A declarative gesture wrapper. See the module docs.
- Glass
Fill - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Glass
Material - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Glass
Scale - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Hero
View - A declarative shared-element wrapper. See the module docs.
- Icon
Button View - A declarative pressable vector icon. See the module docs.
- Icon
Data - A cheap-clone handle around an icon’s path data and its design box.
- Icon
Source - A generated icon: SVG path
ddata plus the side length of its square design box. - Icon
View - A declarative icon. See the module docs.
- Icon
Widget - The retained widget for an
IconView. - Image
Error - Error decoding image bytes via
ImageSource::decode. - Image
Source - A decode-once, cheaply-clonable handle around a decoded RGBA8 image.
- Image
View - A declarative description of an image.
- List
View - A declarative, virtualized vertical list. See the module docs.
- List
View Widget - The retained widget for a
ListView: the materialized window of children (children[j]renders itemkeys[j]), the scroll offset + cached viewport, and the same fling bookkeeping ascrate::ScrollWidget. - Location
- The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Memo
- A memo is an efficient derived reactive value based on other reactive values.
- Menu
Event - The menu-activation read surface (
frust-reactive’s process-wide menu source — see its module docs): a per-OS desktop shell drains its native menu queue once per frame and reports each activation, and app code observes it here.menu_events()returns the liveMenuEventshandle whoselatestsignal carries aMenuEvent— the activated item’sidexactly as the app wrote it in itsMenuSpec, plus a monotonicsequenceso choosing the same item twice reads as two activations rather than one stale value. - Menu
Events - The menu-activation read surface (
frust-reactive’s process-wide menu source — see its module docs): a per-OS desktop shell drains its native menu queue once per frame and reports each activation, and app code observes it here.menu_events()returns the liveMenuEventshandle whoselatestsignal carries aMenuEvent— the activated item’sidexactly as the app wrote it in itsMenuSpec, plus a monotonicsequenceso choosing the same item twice reads as two activations rather than one stale value. - Menu
Spec - The desktop app’s identity and native-integration vocabulary, re-exported
from the desktop core so app code never names a shell crate:
DesktopConfig(the whole declaration — app name, reverse-DNS id, window icon, menu bar, last-window-close policy — handed toApp::desktop,run_desktop_configorapp!’sdesktop = { .. }argument),MenuSpec/MenuItemSpec/MenuRole(the platform-independent native menu tree a per-OS shell translates into an NSApp menu bar or anHMENU),DesktopIconData(decoded, tightly-packed RGBA8 — decoding a PNG/ICO/ICNS is the caller’s job), andDEFAULT_APP_NAME(the window title a config that names nothing still gets). - Motion
Durations - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Motion
Scheme - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Motion
Spring - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Native
Typefaces - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Navigator
Controller - The app-state handle to a
navigator: a cloneable op queue an app keeps in itsComponent::Stateand drives withpush/pop/replace. Every clone shares one queue (Rc), so the handle the view carries and the handle event handlers call are the same. - Navigator
Id - An opaque identity for the navigator a
NavigatorControllerdrives: every clone of one controller reports the same value, and two independently constructed controllers never do. - Navigator
View - A declarative navigator. See the module docs.
- Never
Scrollable - Flutter’s
NeverScrollableScrollPhysics: refuse every drag, deferring everything else to the chained parent — an inner list inside an outer scroller, or a temporarily locked surface. - Overlay
Placement - A resolved placement request: which side, how it lines up, how far off the anchor it sits, and how it may move to stay inside the area.
- Overlay
Portal View - A declarative overlay portal. See
overlay_portal. - Padding
View - A declarative padding container. See the module docs.
- PanZoom
Controller - A pan/zoom viewport over one child — a node-and-edge graph, a map, a large
image — without hand-rolling the gesture math.
pan_zoomlays its child out at its natural size and places it under a scale-then-translate transform (PanZoomTransform) the user drives: primary drag pans (unless the child claims the press), a touch pinch or a desktop ctrl/⌘+wheel and trackpad pinch zooms about the gesture’s focal point, clamped to.min_scale/.max_scale. A plain wheel still reaches the child, and the child sees its own unscaled local coordinates at any zoom. Flat-re-exported fromfrust-widgetsso app code never names that crate directly; seePanZoomView’s own doc for the full contract (.inertiaglide,.on_transformnotification, and thePanZoomControllerhandle’sjump_to/fit_to_bounds/fit_rect). - PanZoom
Transform - A pan/zoom viewport over one child — a node-and-edge graph, a map, a large
image — without hand-rolling the gesture math.
pan_zoomlays its child out at its natural size and places it under a scale-then-translate transform (PanZoomTransform) the user drives: primary drag pans (unless the child claims the press), a touch pinch or a desktop ctrl/⌘+wheel and trackpad pinch zooms about the gesture’s focal point, clamped to.min_scale/.max_scale. A plain wheel still reaches the child, and the child sees its own unscaled local coordinates at any zoom. Flat-re-exported fromfrust-widgetsso app code never names that crate directly; seePanZoomView’s own doc for the full contract (.inertiaglide,.on_transformnotification, and thePanZoomControllerhandle’sjump_to/fit_to_bounds/fit_rect). - PanZoom
View - A pan/zoom viewport over one child — a node-and-edge graph, a map, a large
image — without hand-rolling the gesture math.
pan_zoomlays its child out at its natural size and places it under a scale-then-translate transform (PanZoomTransform) the user drives: primary drag pans (unless the child claims the press), a touch pinch or a desktop ctrl/⌘+wheel and trackpad pinch zooms about the gesture’s focal point, clamped to.min_scale/.max_scale. A plain wheel still reaches the child, and the child sees its own unscaled local coordinates at any zoom. Flat-re-exported fromfrust-widgetsso app code never names that crate directly; seePanZoomView’s own doc for the full contract (.inertiaglide,.on_transformnotification, and thePanZoomControllerhandle’sjump_to/fit_to_bounds/fit_rect). - PanZoom
Widget - A pan/zoom viewport over one child — a node-and-edge graph, a map, a large
image — without hand-rolling the gesture math.
pan_zoomlays its child out at its natural size and places it under a scale-then-translate transform (PanZoomTransform) the user drives: primary drag pans (unless the child claims the press), a touch pinch or a desktop ctrl/⌘+wheel and trackpad pinch zooms about the gesture’s focal point, clamped to.min_scale/.max_scale. A plain wheel still reaches the child, and the child sees its own unscaled local coordinates at any zoom. Flat-re-exported fromfrust-widgetsso app code never names that crate directly; seePanZoomView’s own doc for the full contract (.inertiaglide,.on_transformnotification, and thePanZoomControllerhandle’sjump_to/fit_to_bounds/fit_rect). - Path
Pattern - The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Platform
View View - Platform-view embedding (platform-views feature): reserve
layout space for a native view (a map, a video player, …) composited
alongside the frust surface.
platform_viewtakes the"dev.frust.<Factory>"-style native factory name registered on each platform and returns a builder (PlatformViewView) over the params/size contract — flat-re-exported fromfrust-widgetsso app code never names that crate directly. - PopResult
- The value a
pophands back to the pusher’sResultCallback, type-erased so a page can return any'staticpayload (mirroring Flutter’sNavigator.pop(result)→push(...).then(...)). - Push
Options - Options for
NavigatorController::push_with_options, carrying a pushed page’s opacity, back-pressBackPolicy, optional per-op transition override, optional result callback, and (for aDismissAnimatedoverlay) the shared dismiss-signal cell the navigator bumps on a back request. - Radio
View - A declarative radio button. See the module docs.
- Radio
Widget - The retained widget for a
RadioView. - Read
Signal - An arena-allocated getter for a reactive signal.
- Reorderable
List View - A declarative drag-to-reorder list. See the module docs.
- Resolved
Page - The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Route
- The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Route
Navigator - The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Route
Observer - The reactive route-state observable:
RouteObserveris the signal face overfrust_widgets’ signal-freeRouteStack/NavChange— the counterpart toRouteNavigator(intent, queued requests) that reads fact (the last-published stack) instead. Construct once (typically inComponent::init) and attach withobserve(navigator(...));RouterDeepLinks::routeshands out the one it wired for a router-driven navigator. Seeroute_state’s module docs for why this bridge lives in the facade rather thanfrust-widgets. Reactive face of one navigator’s route stack:Copy + Send + Sync(fiveRwSignals and nothing else), so it ridesprovide_context— the navigator’s ownNavigatorController/Routernever can (seefrust_widgets::nav::route’s module docs for why). - Route
Stack - The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Router
- The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Router
Deep Links - Router ⇄ deep-link auto-wiring:
router_with_deep_links/RouterDeepLinksresolve aRouter’s start location from the process’s cold-start deep link (falling back to an app-supplied default) and keep navigating it on every subsequent warm link — seeRouterDeepLinks’s doc for the precedence and dedupe contracts. This is the ONLY place in the facade that sees bothfrust-widgets’Routerandfrust-reactive‘s deep-link source together; neither underlying crate depends on the other. Router ⇄ deep-link auto-wiring:router_with_deep_links/RouterDeepLinksresolve aRouter’s start location from the process’s cold-start deep link (falling back to an app-supplied default) and keep navigating it on every subsequent warm link — seeRouterDeepLinks’s doc for the precedence and dedupe contracts. This is the ONLY place in the facade that sees bothfrust-widgets’Routerandfrust-reactive‘s deep-link source together; neither underlying crate depends on the other. Router ⇄ deep-link auto-wiring:router_with_deep_links/RouterDeepLinksresolve aRouter’s start location from the process’s cold-start deep link (falling back to an app-supplied default) and keep navigating it on every subsequent warm link — seeRouterDeepLinks’s doc for the precedence and dedupe contracts. This is the ONLY place in the facade that sees bothfrust-widgets’Routerandfrust-reactive’s deep-link source together; neither underlying crate depends on the other. ARouterwired to the process-wide deep-link source (see the module docs). Construct once withrouter_with_deep_links(orRouterDeepLinks::newdirectly) — typically fromComponent::init, storing the result inComponent::State— then calltrackfrom everyComponent::buildto keep navigating on subsequent warm links. - Rubber
Band - The iOS-style rubber-band scroll feel: a drag may pull the position past an
edge, resisted by [
OVERSCROLL_RESISTANCE], and nothing about a boundary is rejected. See the module docs for what the trait does not carry for this physics. - RwSignal
- The reactive-programming vocabulary
Componentstate is built on: signals, memos, and context, flat-re-exported fromfrust-reactive/reactive_graphso app authors never name either crate directly. An arena-allocated signal that can be read from or written to. - Safe
Area View - A declarative safe-area container. See the module docs.
- Scaffold
View - A declarative scaffold. See the module docs.
- Scroll
Controller - A cloneable handle onto a
ScrollViewor aListView: drive it withjump_to/animate_to(and, on a keyed list,scroll_to_item), read where it stands withoffset/max_offset/viewport_extent, and observe it withon_change. Every clone shares one state, so the handle an app keeps in its state and the one attached to the view are the same. See the module docs for the apply/publish contract. - Scroll
Info - A scroll observation snapshot handed to
ScrollView::on_scroll. - Scroll
Metrics - A read-only snapshot of a scroll surface’s extent/position, the argument
every
ScrollPhysicsmethod reasons over (Flutter’sScrollMetrics). - Scroll
Subscription - Keeps an
ScrollController::on_changelistener subscribed; dropping it unsubscribes. Holds the handle weakly, so it never keeps a controller alive. - Scroll
View - A declarative vertical scroll surface. See the module docs.
- Selection
Toolbar Actions - The selection-toolbar seam: the request a text field publishes when it
has a selection (
SelectionToolbarRequest/SelectionToolbarActions), and the knobs that decide who draws it. - Selection
Toolbar Request - The selection-toolbar seam: the request a text field publishes when it
has a selection (
SelectionToolbarRequest/SelectionToolbarActions), and the knobs that decide who draws it. - Shadow
Spec - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Shape
Scale - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Shield
View - Platform-view embedding (platform-views feature): reserve
layout space for a native view (a map, a video player, …) composited
alongside the frust surface.
platform_viewtakes the"dev.frust.<Factory>"-style native factory name registered on each platform and returns a builder (PlatformViewView) over the params/size contract — flat-re-exported fromfrust-widgetsso app code never names that crate directly. - Sized
BoxView - A declarative fixed-size box, optionally wrapping a child. See the module docs.
- Slider
View - A declarative slider. See the module docs.
- Spring
- The animation vocabulary: the shell-fed frame clock (
FrameTime) plus the pure easing/interpolation/spring math a widget or app advances it through, flat-re-exported fromfrust-core::anim. Time enters from the shell during paint (PaintCtx::frame_time); nothing here reads a clock. The analytic response of aSpringDescreleased from an initial displacement + velocity toward equilibrium at0. - Spring
Desc - The animation vocabulary: the shell-fed frame clock (
FrameTime) plus the pure easing/interpolation/spring math a widget or app advances it through, flat-re-exported fromfrust-core::anim. Time enters from the shell during paint (PaintCtx::frame_time); nothing here reads a clock. Physical parameters of a damped spring (a mass on a spring with a damper). - Spring
Description - A critically-damped-family spring’s physical parameters, feeding a
Simulationbuilt fromScrollPhysics::spring(Flutter’sSpringDescription). - Stack
View - A declarative z-ordered stack. See the module docs.
- Status
Colors - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Status
Palette - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Text
Input View - A declarative text field, single-line by default. See the module docs.
- Text
View - A declarative description of a run of text.
- Theme
- The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Theme
Builder - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Theme
Extensions - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Tolerance
- The velocity/distance thresholds below which a ballistic simulation is
considered settled — Flutter’s
Tolerance, produced bytoleranceFor. - Transition
Spec - A transition selection: which
PageTransitionshape, driven by whichTiming. Attached per-push/replace (or defaulted at the navigator level); a pop reverses the popped page’s stored spec. - Transition
State - A snapshot of the navigator’s single in-flight page transition, published by
NavigatorWidgetand read throughNavigatorController::transition. - Tween
- The animation vocabulary: the shell-fed frame clock (
FrameTime) plus the pure easing/interpolation/spring math a widget or app advances it through, flat-re-exported fromfrust-core::anim. Time enters from the shell during paint (PaintCtx::frame_time); nothing here reads a clock. Abegin→endinterpolation over aLerpvalue type. - Type
Scale - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - UseTask
- The heavy-work idiom:
AsyncValuestate,use_task(the blessed load/compute helper),UseTaskhandle, andspawn_blocking(the CPU-bound entry point) — Frust’s counterpart to Flutter’scompute()/FutureBuilder, with explicit cancellation on component teardown.spawn_blockingjoins the existingspawn/spawn_localrouting pair (async IO / UI-thread!Send/ one-off CPU work). App crates need no new dependency: this is the whole heavy-work surface. Seefrust_reactive::taskfor the threading contract. The handleuse_taskreturns: a read handle to the task’sAsyncValue<T>state plus arestart/refresh trigger. - Window
Metrics - The window’s shape, flat-re-exported from
frust-core::appso app code (not just widget authors, seeauthoring::WindowMetrics) can recover it viause_context::<WindowMetrics>()insideComponent::build— a component laying itself out around window size/scale/orientation reads this the same way it reads aThemeviause_context. Delivered as a plain value (not anRwSignal); seeWindowMetrics’s own doc for the derived-Orientationand rebuild-cost notes. The window’s shape and platform-occlusion state, delivered to app code as a plainprovide_context-carried value — logical size, device-pixel scale, a derived orientation, and the currentWindowInsets. - Write
Signal - An arena-allocated setter for a reactive signal.
Enums§
- Animation
Status - The animation vocabulary: the shell-fed frame clock (
FrameTime) plus the pure easing/interpolation/spring math a widget or app advances it through, flat-re-exported fromfrust-core::anim. Time enters from the shell during paint (PaintCtx::frame_time); nothing here reads a clock. The lifecycle status of anAnimationController. - Async
Value - The heavy-work idiom:
AsyncValuestate,use_task(the blessed load/compute helper),UseTaskhandle, andspawn_blocking(the CPU-bound entry point) — Frust’s counterpart to Flutter’scompute()/FutureBuilder, with explicit cancellation on component teardown.spawn_blockingjoins the existingspawn/spawn_localrouting pair (async IO / UI-thread!Send/ one-off CPU work). App crates need no new dependency: this is the whole heavy-work surface. Seefrust_reactive::taskfor the threading contract. The exhaustive state of an asynchronously-loaded value. - Axis
- The axis a
FlexViewlays its children along. - Back
Policy - How a page participates in a back press routed through
NavigatorController::request_back(Android hardware/gesture back, via the facade’s back-press wiring). A page declares its policy when pushed viaPushOptions::back; every existing push defaults toPop. - Border
Style - A border’s stroke style, set via
ContainerView::border_style. Solid by default;ContainerView::borderalone (with no.border_stylecall) keeps the pre-existing solid-only behavior unchanged. - Brightness
- The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Button
Style - Visual style variant for
Button. Additive: the default preserves today’s only look byte-for-byte under every theme. See the module docs for the full role-mapping intent. - Cross
Axis Alignment - How children are aligned along the cross axis.
- Cursor
Icon - The pointer-cursor vocabulary, flat-re-exported from
frust-core::event(and also available throughauthoring::CursorIcon). - Curve
- The animation vocabulary: the shell-fed frame clock (
FrameTime) plus the pure easing/interpolation/spring math a widget or app advances it through, flat-re-exported fromfrust-core::anim. Time enters from the shell during paint (PaintCtx::frame_time); nothing here reads a clock. An easing curve mapping a normalized timet ∈ [0, 1]to an eased progress∈ [0, 1]. - Deceleration
Rate - How quickly a
Bouncingsurface’s fling decays — Flutter’sScrollDecelerationRate. - Design
Language - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - Drag
Highlight - What a
DragTargetView::highlightpaint seam is asked to show for a session currently over the target. - Drag
Kind - Where a drag session came from.
- Drag
Phase - The phase tag of a drag session — what a
DragStateChange::Phasereports andDragCoordinator::phasereads. - Drag
Policy - How a press on a
draggable()becomes a drag. See the module docs. - Drag
State - A snapshot of a coordinator’s state (
DragCoordinator::state). - Drag
State Change - One change a
DragCoordinator::subscribelistener hears. - Edit
Command - The clipboard/selection command vocabulary, flat-re-exported from
frust-core::event(and also available throughauthoring::EditCommand). - Either
- A view that is one of two statically-typed arms. See the module docs.
- Either
Of3 - Pick one of three view types from a
matchwhile keeping every arm statically typed (noAnyViewerasure). - Either
Of4 - A view that is one of four statically-typed arms. Arm swaps behave as for
Either: the old arm is torn down, the new one built fresh, andLAYOUT | PAINTis reported. See the module docs. - Either
Of5 - A view that is one of five statically-typed arms. Arm swaps behave as for
Either: the old arm is torn down, the new one built fresh, andLAYOUT | PAINTis reported. See the module docs. - Either
Of6 - A view that is one of six statically-typed arms. Arm swaps behave as for
Either: the old arm is torn down, the new one built fresh, andLAYOUT | PAINTis reported. See the module docs. - Either
Of7 - A view that is one of seven statically-typed arms. Arm swaps behave as for
Either: the old arm is torn down, the new one built fresh, andLAYOUT | PAINTis reported. See the module docs. - Either
Of8 - A view that is one of eight statically-typed arms. Arm swaps behave as for
Either: the old arm is torn down, the new one built fresh, andLAYOUT | PAINTis reported. See the module docs. - Either
Of3Widget - Retained widget for
EitherOf3: the live arm’s widget, delegated to for every pass. - Either
Of4Widget - Retained widget for
EitherOf4: the live arm’s widget, delegated to for every pass. - Either
Of5Widget - Retained widget for
EitherOf5: the live arm’s widget, delegated to for every pass. - Either
Of6Widget - Retained widget for
EitherOf6: the live arm’s widget, delegated to for every pass. - Either
Of7Widget - Retained widget for
EitherOf7: the live arm’s widget, delegated to for every pass. - Either
Of8Widget - Retained widget for
EitherOf8: the live arm’s widget, delegated to for every pass. - Either
Widget - Retained widget for
Either: the live arm’s widget, delegated to for every pass. - File
Drop Phase - The file-drop vocabulary for handling file drops from the OS.
InputEvent::FileDropcarries aFileDropEvent, which embeds aFileDropPhase(Hover,Drop,Cancel, or the broadcast-onlyEndedthat follows everyDrop/Cancel) and the dropped file paths (only onDrop). A widget handling drops is hit-tested and bubbles like [InputEvent::Scroll]. Lifted flat for the same reasonEditCommandis: an app’s file-drop handler names these types in its public API without being a widget author. The phase of a desktop OS file drag entering, hovering over, dropping on, or leaving the window — seeInputEvent::FileDrop. - Image
Decode Error - Off-thread image decode:
decode_image_asyncwraps the existing synchronousImageSource::decodeinspawn_blocking, so it composes withuse_taskfor the full load/error/ready idiom without ever blocking the UI thread on a decode. Seeimage_async’s module docs for why this lives in the facade rather thanfrust-widgets(which stays reactive-free by charter) and for the Arc-move contract the decodedImageSourcecrosses threads under. Off-thread image decode:decode_image_asyncwraps the existing synchronousImageSource::decodeinspawn_blocking, so it composes withuse_taskfor the full load/error/ready idiom without ever blocking the UI thread on a decode. Seeimage_async’s module docs for why this lives in the facade rather thanfrust-widgets(which stays reactive-free by charter) and for the Arc-move contract the decodedImageSourcecrosses threads under. Off-thread image decode:decode_image_asyncwraps the existing synchronousImageSource::decodeinspawn_blocking, so it composes withuse_taskfor the full load/error/ready idiom without ever blocking the UI thread on a decode. Seeimage_async’s module docs for why this lives in the facade rather thanfrust-widgets(which stays reactive-free by charter) and for the Arc-move contract the decodedImageSourcecrosses threads under. The errordecode_image_asynccan fail with. - Image
Fit - How an
Image’s laid-out box relates to its source’s natural pixel size at paint time. - Item
Alignment - Where
ScrollController::scroll_to_itemlands a row in the viewport. - Main
Axis Alignment - How children are distributed along the main axis.
- Menu
Item Spec - The desktop app’s identity and native-integration vocabulary, re-exported
from the desktop core so app code never names a shell crate:
DesktopConfig(the whole declaration — app name, reverse-DNS id, window icon, menu bar, last-window-close policy — handed toApp::desktop,run_desktop_configorapp!’sdesktop = { .. }argument),MenuSpec/MenuItemSpec/MenuRole(the platform-independent native menu tree a per-OS shell translates into an NSApp menu bar or anHMENU),DesktopIconData(decoded, tightly-packed RGBA8 — decoding a PNG/ICO/ICNS is the caller’s job), andDEFAULT_APP_NAME(the window title a config that names nothing still gets). - Menu
Role - The desktop app’s identity and native-integration vocabulary, re-exported
from the desktop core so app code never names a shell crate:
DesktopConfig(the whole declaration — app name, reverse-DNS id, window icon, menu bar, last-window-close policy — handed toApp::desktop,run_desktop_configorapp!’sdesktop = { .. }argument),MenuSpec/MenuItemSpec/MenuRole(the platform-independent native menu tree a per-OS shell translates into an NSApp menu bar or anHMENU),DesktopIconData(decoded, tightly-packed RGBA8 — decoding a PNG/ICO/ICNS is the caller’s job), andDEFAULT_APP_NAME(the window title a config that names nothing still gets). - NavChange
- The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - NavRequest
- The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Orientation
- The window’s shape, flat-re-exported from
frust-core::appso app code (not just widget authors, seeauthoring::WindowMetrics) can recover it viause_context::<WindowMetrics>()insideComponent::build— a component laying itself out around window size/scale/orientation reads this the same way it reads aThemeviause_context. Delivered as a plain value (not anRwSignal); seeWindowMetrics’s own doc for the derived-Orientationand rebuild-cost notes. A window’s derived portrait/landscape orientation. - Outside
Tap - The overlay portal’s own vocabulary, flat-re-exported from
frust-core: which z-band a floated surface sits in, whether the pointer reaches it, and what a press landing outside it delivers. - Overlay
Align - How a floated surface lines up with its anchor on the cross axis.
- Overlay
Band - The overlay portal’s own vocabulary, flat-re-exported from
frust-core: which z-band a floated surface sits in, whether the pointer reaches it, and what a press landing outside it delivers. - Overlay
Input - The overlay portal’s own vocabulary, flat-re-exported from
frust-core: which z-band a floated surface sits in, whether the pointer reaches it, and what a press landing outside it delivers. - Overlay
Side - The side of the anchor a floated surface opens on.
- Overscroll
Effect - How overscroll displacement/pull is VISUALIZED — orthogonal to physics.
- Page
Transition - The visual shape of a page transition. The navigator maps the active
transition’s progress onto per-page geometry through
resolve_layers. - Page
Visibility - Where a retained page sits in the stack right now — the vocabulary
PushOptions::on_visibility/NavigatorView::on_root_visibilityreport. - Resolution
- The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Resolved
Surface Mode - App-facing resolved surface mode — the read-only outward half of the Mode B seam whose setter is deliberately absent (see the comment above): what the platform actually gave this process, not what the host asked for.
- Selection
Toolbar Policy - The selection-toolbar seam: the request a text field publishes when it
has a selection (
SelectionToolbarRequest/SelectionToolbarActions), and the knobs that decide who draws it. - Source
Feedback - What the source looks like in place while its drag is in flight.
- Surface
Role - The design-token vocabulary: the
Themebundle plus its component token tables, flat-re-exported fromfrust-themeso app code never names that crate directly. A root component reads the active theme viause_context::<Theme>(); a widget reads it during paint/layout viaPaintCtx::theme_as/LayoutCtx::theme_as(orTheme::from_paint_ctx). - System
UiMode - App-facing system-UI (system-bar) override:
set_system_ui_moderequests a status-/navigation-bar visibility mode — the FlutterSystemChrome.setEnabledSystemUIModeanalog — reaching whichever shell is running the next time it polls (once per frame, mirroringset_app_theme’s delivery timing). Seefrust_shell_common::system_ui’s module docs for the full layering rationale, the thread contract (a plainMutex-guarded process-global, callable from any thread), the FFI wire format each mobile shell exports, and where Android/iOS diverge from the five-mode vocabulary. - System
UiOverlay - App-facing system-UI (system-bar) override:
set_system_ui_moderequests a status-/navigation-bar visibility mode — the FlutterSystemChrome.setEnabledSystemUIModeanalog — reaching whichever shell is running the next time it polls (once per frame, mirroringset_app_theme’s delivery timing). Seefrust_shell_common::system_ui’s module docs for the full layering rationale, the thread contract (a plainMutex-guarded process-global, callable from any thread), the FFI wire format each mobile shell exports, and where Android/iOS diverge from the five-mode vocabulary. - Timing
- How a transition’s
0.0..=1.0progress is driven. - Transition
Driver - The page-transition resolve/drive path: the framework’s own reduce- motion collapse policy, re-exported so an app-authored animation reuses it rather than re-deriving it.
Constants§
- AUTO_
SCROLL_ EDGE_ PX - The default depth, in logical px, of each edge zone
(
AutoScroll::edge_px). - AUTO_
SCROLL_ MAX_ PX_ PER_ S - The default top speed, in logical px per second, reached at the very edge
(
AutoScroll::max_px_per_s). - DEFAULT_
APP_ NAME - The desktop app’s identity and native-integration vocabulary, re-exported
from the desktop core so app code never names a shell crate:
DesktopConfig(the whole declaration — app name, reverse-DNS id, window icon, menu bar, last-window-close policy — handed toApp::desktop,run_desktop_configorapp!’sdesktop = { .. }argument),MenuSpec/MenuItemSpec/MenuRole(the platform-independent native menu tree a per-OS shell translates into an NSApp menu bar or anHMENU),DesktopIconData(decoded, tightly-packed RGBA8 — decoding a PNG/ICO/ICNS is the caller’s job), andDEFAULT_APP_NAME(the window title a config that names nothing still gets). - DEFAULT_
REDIRECT_ LIMIT - The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - DRAG_
THRESHOLD - How far, in logical px, a press under the distance policy travels before
it becomes a drag (
DraggableView::thresholdoverrides it). - GHOST_
OPACITY - The default opacity a ghost is painted at
(
DraggableView::ghost_opacityoverrides it) — translucent enough that what it hovers over stays legible. - HIGHLIGHT_
FALLBACK - The default highlight’s stroke color with no theme threaded; themed, it uses
frust_theme::ColorScheme::primary— mirrorscrate::slider’sTHUMB_FILL/FILLunthemed fallbacks (same token, same role). - MAX_
FLING_ VELOCITY - The fastest fling speed (px/s) a physics honors — Flutter’s
kMaxFlingVelocity. A release faster than this clamps to it. - MIN_
FLING_ VELOCITY - The minimum release speed (px/s) that starts a fling — Flutter’s
kMinFlingVelocity. A release slower than this is treated as a plain drag-end, never a fling.
Traits§
- Component
- A piece of UI with retained local state (Flutter’s
StatefulWidgetanalog). - Get
- Clones the value of the signal, without tracking the value reactively. and subscribes the active reactive observer (an effect or computed) to changes in its value.
- GetUntracked
- Clones the value of the signal, without tracking the value reactively.
- Lerp
- The animation vocabulary: the shell-fed frame clock (
FrameTime) plus the pure easing/interpolation/spring math a widget or app advances it through, flat-re-exported fromfrust-core::anim. Time enters from the shell during paint (PaintCtx::frame_time); nothing here reads a clock. Component-wise linear interpolation between two values of the same type. - Scroll
Physics - A pluggable scroll-motion strategy — Flutter’s
ScrollPhysicscontract. - Set
- Updates the value of the signal by replacing it.
- Simulation
- A ballistic motion curve over time, produced by
ScrollPhysics::create_ballistic_simulationand driven by the consuming widget after a gesture release (fling decay, a spring-back, or any other closed-form or iterative curve). - Track
- Allows tracking the value of some reactive data.
- Update
- Updates the value of a signal by applying a function that updates it in place, notifying its subscribers that the value has changed.
- View
- A declarative description of a piece of UI.
- ViewSeq
- A child sequence: what a container’s child-list parameter accepts, so app
code passes heterogeneous children without writing
anyat the call site. - With
- Give read-only access to a signal’s value by reference inside a closure, and subscribes the active reactive observer (an effect or computed) to changes in its value.
- With
Untracked - Give read-only access to a signal’s value by reference inside a closure, without tracking the value reactively.
Functions§
- Align
- Position
childwithin the align’s box peralignment. - Button
- PascalCase alias for
button, matching the container view-fn vocabulary. - Checkbox
- PascalCase alias for
checkbox. - Column
- A vertical flex (
Axis::Vertical) of inflexible children — the common sugar. UseFlexView::newwithflexiblechildren when some should expand. - Gesture
Detector - Wrap
childin a gesture detector (no recognisers until one is attached, e.g. withGestureDetectorView::on_taporGestureDetectorView::on_long_press). - Icon
- PascalCase alias for
icon. - Icon
Button - PascalCase alias for
icon_button, matching the container view-fn vocabulary (seecrate::Icon/crate::Button’s own aliases). - Image
- Create an image view over a decoded
ImageSource, defaulting toImageFit::Contain. - Padding
- Inset
childbyinsetson each edge. - Radio
- PascalCase alias for
radio. - Row
- A horizontal flex (
Axis::Horizontal) of inflexible children — the common sugar. UseFlexView::newwithflexiblechildren when some should expand. - Sized
Box - A box that forces
width/heightwhereSome, passing through whereNone. - Slider
- PascalCase alias for
slider. - Stack
- Overlay
childrenin a z-order stack (first child at the bottom). - Text
Input - PascalCase alias for
text_input. - any
- Erase
viewinto anAnyView— the free-function spelling ofAnyView::new, mirroring thetext(..)/button(..)view-fn vocabulary. - attach_
back_ handler - Android back-press ⇄ navigator auto-wiring:
attach_back_handler/BackHandlerpop aNavigatorControlleron a platform back press and keepfrust-reactive‘shandles_backflag in sync with the stack depth, so a shell knows whether a root-level back should fall through to the platform (activity finish). MirrorsRouterDeepLinks’s shape and, like it, is the ONLY place in the facade that sees bothfrust-widgets’NavigatorControllerandfrust-reactive’s back-press source together — seeBackHandler’s doc for the consume/dedupe and timing contracts. CallBackHandler::trackfrom everyComponent::build. Android back-press ⇄ navigator auto-wiring:attach_back_handler/BackHandlerpop aNavigatorControlleron a platform back press and keepfrust-reactive‘shandles_backflag in sync with the stack depth, so a shell knows whether a root-level back should fall through to the platform (activity finish). MirrorsRouterDeepLinks’s shape and, like it, is the ONLY place in the facade that sees bothfrust-widgets’NavigatorControllerandfrust-reactive’s back-press source together — seeBackHandler’s doc for the consume/dedupe and timing contracts. CallBackHandler::trackfrom everyComponent::build. Android back-press ⇄ navigator auto-wiring:attach_back_handler/BackHandlerpop aNavigatorControlleron a platform back press and keepfrust-reactive‘shandles_backflag in sync with the stack depth, so a shell knows whether a root-level back should fall through to the platform (activity finish). MirrorsRouterDeepLinks’s shape and, like it, is the ONLY place in the facade that sees bothfrust-widgets’NavigatorControllerandfrust-reactive’s back-press source together — seeBackHandler’s doc for the consume/dedupe and timing contracts. CallBackHandler::trackfrom everyComponent::build. Convenience constructor equivalent toBackHandler::new— see its docs andRouterDeepLinks/router_with_deep_linksfor the mirrored API shape. - auto_
scroll_ zone - Wrap
child— a scroll surface holdingcontroller— in an edge auto-scroll zone for sessions oncoordinator, with the defaultAutoScroll. See the module docs. - back_
presses - The Android back-press source (
frust-reactive’s process-wide back source — see itsbackmodule docs). A mobile shell delivers a hardware/gesture back press viapush_back_press, and the facade’sBackHandlerreads it viaback_pressesto pop a navigator;set_handles_back/handles_backare the “framework consumes the next back” flag a shell polls to decide whether a root-level back falls through to the platform. App code normally usesattach_back_handlerrather than these directly;push_back_pressis also the desktop dev seam (no shell writes on desktop yet). The current back-press read surface: the liveBackPresses::countsignal. Call from a tracked context (e.g. insideComponent::build, via the facade’sBackHandler) to observe subsequent presses as they arrive. - button
- Create a button labelled
labelthat runson_pressagainst the app state when released inside its bounds. - canvas
- Declarative custom painting over the [
PaintScene] trait object — a chart, a node-and-edge graph, a game board — without hand-rolling aView/Widgetpair.canvastakes a paint closure that runs in local space (the widget’s own top-left is always(0, 0), and painting past its own size is clipped, never a bug to chase) — flat-re-exported fromfrust-widgetsso app code never names that crate directly. SeeCanvasView’s own doc for the full builder contract (.size/.expandsizing,.on_hit-gated.on_tap/.on_pointer, and.repaint_keyfor paint-only dirtying driven by data outside the ordinaryViewdiff). - checkbox
- Create a checkbox reflecting
checked, labelledlabel, that fireson_toggle(state, !checked)on release inside its bounds. - clear_
app_ theme - App-facing theme override:
set_app_themeforces the app’s activeThemeend-to-end — both delivery paths a shell owned exclusively before this (widget paint/layout viaRenderRoot::set_theme, anduse_context::<Theme>()viaprovide_context) — reflecting the change the next time the running shell polls (once per frame; desktop before rebuild, mobile at the top of the frame callback).clear_app_themereturns to the platform’s own light/dark-derived default. Seefrust_shell_common::theme_override’s module docs for the full layering rationale, the thread contract (a plainMutex-guarded process-global — no UI-thread panic, unlikepush_deep_link), and the override-wins-over-appearance rule (an app override, once set, is never overridden back by a live platform dark-mode flip untilclear_app_themeruns). - colored_
box - A childless
ContainerView— the leaf/background family. See the module docs. - column
- An empty vertical flex, ready for fluent children (no
any(..)wrapping). - component
- Host a
Componentas aView— the view-fn spelling ofComponentView, mirroring thetext(..)/button(..)vocabulary. - container
- Wrap
childin aContainerView— the single-child wrapper family. See the module docs. - decode_
image_ async - Off-thread image decode:
decode_image_asyncwraps the existing synchronousImageSource::decodeinspawn_blocking, so it composes withuse_taskfor the full load/error/ready idiom without ever blocking the UI thread on a decode. Seeimage_async’s module docs for why this lives in the facade rather thanfrust-widgets(which stays reactive-free by charter) and for the Arc-move contract the decodedImageSourcecrosses threads under. Off-thread image decode:decode_image_asyncwraps the existing synchronousImageSource::decodeinspawn_blocking, so it composes withuse_taskfor the full load/error/ready idiom without ever blocking the UI thread on a decode. Seeimage_async’s module docs for why this lives in the facade rather thanfrust-widgets(which stays reactive-free by charter) and for the Arc-move contract the decodedImageSourcecrosses threads under. Off-thread image decode:decode_image_asyncwraps the existing synchronousImageSource::decodeinspawn_blocking, so it composes withuse_taskfor the full load/error/ready idiom without ever blocking the UI thread on a decode. Seeimage_async’s module docs for why this lives in the facade rather thanfrust-widgets(which stays reactive-free by charter) and for the Arc-move contract the decodedImageSourcecrosses threads under. Decodes PNG/JPEGbytesoff the UI thread viafrust_reactive::spawn_blocking, returning the sameImageSourceImageSource::decodewould build synchronously. - deep_
links - The deep-link read surface (
frust-reactive’sapp_links- style process-wide source — see its module docs for the semantics): a mobile shell delivers a platform link viafrust-reactive’spush_deep_link, and app code reads it here —deep_links()returns aDeepLinkssnapshot (DeepLinks::initial) plus the live, trackableDeepLinks::latestsignal aComponent::buildreads to react to cold-start and subsequent links uniformly. Router auto-wiring (resolvingdeep_links()against aRouter) is a separate opt-in, not automatic here. - divider
- A horizontal hairline of
color, [DEFAULT_THICKNESS] (1px) thick, filling the available width.coloris a required argument, not defaulted — see the module docs’ “Color: required, noThemedependency” section. - drag_
target - Make
childa drop target oncoordinator, accepting payloads of typeT(specifyTexplicitly — nothing else names it):drag_target::<Item>(child, coordinator). See the module docs for the registration/notification contract. - draggable
- Make
childa drag source oncoordinator: a press that becomes a drag (seeDragPolicy) begins a session carryingpayload(state). - either
- Pick an arm by
cond:lwhen true,rwhen false. Only the chosen closure runs, so the unused arm is never constructed. - flexible
- A flexible child taking
flexproportional shares of the free main-axis space. - handles_
back - The Android back-press source (
frust-reactive’s process-wide back source — see itsbackmodule docs). A mobile shell delivers a hardware/gesture back press viapush_back_press, and the facade’sBackHandlerreads it viaback_pressesto pop a navigator;set_handles_back/handles_backare the “framework consumes the next back” flag a shell polls to decide whether a root-level back falls through to the platform. App code normally usesattach_back_handlerrather than these directly;push_back_pressis also the desktop dev seam (no shell writes on desktop yet). Whether the framework wants to consume the next back press. A shell polls this to decide whether a back press should be routed into the app (true) or fall through to the platform / activity finish (false, the default until glue publishes otherwise — see the module docs). - hero
- Tag
childas a shared element undertag, so anavigatormorphs it between two pages that both carry the same tag during a page transition. Outside a transition this is a transparent wrapper. - icon
- Create an icon view over any
IconDatasource (a generatedIconSource, or a user path viaIconData::from_path), at the default 24.0 logical size with the theme’son_surfacecolor. - icon_
button - Create a pressable vector icon painting
mark, labelledlabelfor accessibility, that runson_pressagainst the app state when released inside its bounds. See the module docs. - inflexible
- An inflexible child, sized to its natural main-axis extent.
- keyed
- An inflexible child tagged with a stable
ChildKey, for a list whose items reorder, insert, or delete between frames. - list_
view - Create a virtualized
ListView— the free-function spelling ofListView::builder.buildermay return anyView; it is erased here. - lock_
selection_ toolbar_ policy - The selection-toolbar seam: the request a text field publishes when it
has a selection (
SelectionToolbarRequest/SelectionToolbarActions), and the knobs that decide who draws it. - make_
driver - The page-transition resolve/drive path: the framework’s own reduce- motion collapse policy, re-exported so an app-authored animation reuses it rather than re-deriving it.
- menu_
events - The menu-activation read surface (
frust-reactive’s process-wide menu source — see its module docs): a per-OS desktop shell drains its native menu queue once per frame and reports each activation, and app code observes it here.menu_events()returns the liveMenuEventshandle whoselatestsignal carries aMenuEvent— the activated item’sidexactly as the app wrote it in itsMenuSpec, plus a monotonicsequenceso choosing the same item twice reads as two activations rather than one stale value. - navigator
- Build a
NavigatorViewdriven bycontroller— the facade’s back-aware wrapper overfrust_widgets::navigator. - on_
cleanup - The reactive-programming vocabulary
Componentstate is built on: signals, memos, and context, flat-re-exported fromfrust-reactive/reactive_graphso app authors never name either crate directly. Registers a function to be run the next time the current owner is cleaned up. - overlay_
host - Build a root overlay host driven by
controller, wrapping the app’s whole root view — the facade’s back-aware wrapper overfrust_widgets::overlay_host. - overlay_
portal - Float
overlayabove the whole app, anchored tochild’s bounds — the declarative half of the portal. - pan_
zoom - A pan/zoom viewport over one child — a node-and-edge graph, a map, a large
image — without hand-rolling the gesture math.
pan_zoomlays its child out at its natural size and places it under a scale-then-translate transform (PanZoomTransform) the user drives: primary drag pans (unless the child claims the press), a touch pinch or a desktop ctrl/⌘+wheel and trackpad pinch zooms about the gesture’s focal point, clamped to.min_scale/.max_scale. A plain wheel still reaches the child, and the child sees its own unscaled local coordinates at any zoom. Flat-re-exported fromfrust-widgetsso app code never names that crate directly; seePanZoomView’s own doc for the full contract (.inertiaglide,.on_transformnotification, and thePanZoomControllerhandle’sjump_to/fit_to_bounds/fit_rect). - platform_
view - Platform-view embedding (platform-views feature): reserve
layout space for a native view (a map, a video player, …) composited
alongside the frust surface.
platform_viewtakes the"dev.frust.<Factory>"-style native factory name registered on each platform and returns a builder (PlatformViewView) over the params/size contract — flat-re-exported fromfrust-widgetsso app code never names that crate directly. - provide_
context - The reactive-programming vocabulary
Componentstate is built on: signals, memos, and context, flat-re-exported fromfrust-reactive/reactive_graphso app authors never name either crate directly. Provides a context value of typeTto the current reactiveOwnerand all of its descendants. This can be accessed usinguse_context. - push_
back_ press - The Android back-press source (
frust-reactive’s process-wide back source — see itsbackmodule docs). A mobile shell delivers a hardware/gesture back press viapush_back_press, and the facade’sBackHandlerreads it viaback_pressesto pop a navigator;set_handles_back/handles_backare the “framework consumes the next back” flag a shell polls to decide whether a root-level back falls through to the platform. App code normally usesattach_back_handlerrather than these directly;push_back_pressis also the desktop dev seam (no shell writes on desktop yet). Deliver a platform back press into the process-wide source. Called by a shell (the Android back callback) on the UI thread; app code never calls this directly. - push_
deep_ link - The deep-link read surface (
frust-reactive’sapp_links- style process-wide source — see its module docs for the semantics): a mobile shell delivers a platform link viafrust-reactive’spush_deep_link, and app code reads it here —deep_links()returns aDeepLinkssnapshot (DeepLinks::initial) plus the live, trackableDeepLinks::latestsignal aComponent::buildreads to react to cold-start and subsequent links uniformly. Router auto-wiring (resolvingdeep_links()against aRouter) is a separate opt-in, not automatic here. - radio
- Create a radio reflecting
selected, labelledlabel. Attach a callback withRadioView::on_select; a radio with none is inert (still paints and captures the press, but never fires) — the same optional-callback shape a design system’s own list-item row uses. - register_
app_ fonts - App-facing pending-font registry:
register_app_fontspushes raw font bytes (TTF/OTF, or a TTC/OTC collection) to be registered into the running shell’sTextContextthe next time it drains this registry (construction time, and once per frame – each shell’s own wiring). Seefrust_shell_common::font_registry’s module docs for the full layering rationale and thread contract (mirrorsset_app_theme’s: a plainMutex-guarded process-global, callable from any thread). - reorderable_
list - Build a reorderable list over
items, each an(identity, content)pair — the samecrate::ChildKeyacrate::keyedcrate::Columnrow would carry. See the module docs for the composition and the index conventionReorderableListView::on_reorderreports through. - resolve_
spec - The page-transition resolve/drive path: the framework’s own reduce- motion collapse policy, re-exported so an app-authored animation reuses it rather than re-deriving it.
- resolved_
surface_ mode - App-facing resolved surface mode — the read-only outward half of the Mode B seam whose setter is deliberately absent (see the comment above): what the platform actually gave this process, not what the host asked for.
- router_
with_ deep_ links - Router ⇄ deep-link auto-wiring:
router_with_deep_links/RouterDeepLinksresolve aRouter’s start location from the process’s cold-start deep link (falling back to an app-supplied default) and keep navigating it on every subsequent warm link — seeRouterDeepLinks’s doc for the precedence and dedupe contracts. This is the ONLY place in the facade that sees bothfrust-widgets’Routerandfrust-reactive‘s deep-link source together; neither underlying crate depends on the other. Router ⇄ deep-link auto-wiring:router_with_deep_links/RouterDeepLinksresolve aRouter’s start location from the process’s cold-start deep link (falling back to an app-supplied default) and keep navigating it on every subsequent warm link — seeRouterDeepLinks’s doc for the precedence and dedupe contracts. This is the ONLY place in the facade that sees bothfrust-widgets’Routerandfrust-reactive‘s deep-link source together; neither underlying crate depends on the other. Router ⇄ deep-link auto-wiring:router_with_deep_links/RouterDeepLinksresolve aRouter’s start location from the process’s cold-start deep link (falling back to an app-supplied default) and keep navigating it on every subsequent warm link — seeRouterDeepLinks’s doc for the precedence and dedupe contracts. This is the ONLY place in the facade that sees bothfrust-widgets’Routerandfrust-reactive’s deep-link source together; neither underlying crate depends on the other. Convenience constructor equivalent toRouterDeepLinks::new— see its docs for the precedence rule and the call-once contract. - row
- An empty horizontal flex, ready for fluent children. See [
column]. - run
- Run a root
Componentin the desktop preview shell until the window closes — the canonicalrunAppequivalent for the Component model. - run_
desktop_ config runwith the app’s desktop identity (DesktopConfig) — the no-setup half of the config-carrying pair, and the functionapp!’sdesktop = { .. }argument routes through when nosetup = { .. }block accompanies it.- run_
with_ setup runwith a setup closure run once, immediately beforeroot.init()— the desktop half ofapp!’ssetup = { .. }block.- run_
with_ setup_ and_ config run_with_setupandrun_desktop_configat once: the single desktop entry point the other three delegate to, differing only in which ofsetupandconfigthey default.- safe_
area - Pad
childby the window’s resolved safe-area insets — all four edges enabled by default (opt an edge out with.left/.top/.right/.bottom), never less than.minimum(zero by default) on an enabled edge. The enabled edges’ insets are consumed:child’s subtree reads zero safe-area padding there (see the module docs). - scaffold
- Scaffold
bodyunder no chrome — attachapp_bar/bottom_bar/fabwith the builder methods below. - scroll_
view - Wrap
childin a verticalScrollView— the free-function spelling ofScrollView::new. - set_
app_ theme - App-facing theme override:
set_app_themeforces the app’s activeThemeend-to-end — both delivery paths a shell owned exclusively before this (widget paint/layout viaRenderRoot::set_theme, anduse_context::<Theme>()viaprovide_context) — reflecting the change the next time the running shell polls (once per frame; desktop before rebuild, mobile at the top of the frame callback).clear_app_themereturns to the platform’s own light/dark-derived default. Seefrust_shell_common::theme_override’s module docs for the full layering rationale, the thread contract (a plainMutex-guarded process-global — no UI-thread panic, unlikepush_deep_link), and the override-wins-over-appearance rule (an app override, once set, is never overridden back by a live platform dark-mode flip untilclear_app_themeruns). - set_
default_ theme - Design-system-facing base-theme seed:
set_default_themesupplies the starting theme a shell seeds itself with, in place of its own built-in fallback — the seam a design-system plugin’sinstall()calls. Unlikeset_app_theme, this does NOT pin brightness: the shell keeps re-deriving light/dark from the platform’s own appearance against this same base, so a design-system-themed app installed this way still honours system dark mode. Seefrust_shell_common::theme_default’s module docs for the full precedence order (set_app_themeoverride →set_default_themebase → the shell’s built-in fallback) and the brightness-following contrast withset_app_themespelled out in full. - set_
handles_ back - The Android back-press source (
frust-reactive‘s process-wide back source — see itsbackmodule docs). A mobile shell delivers a hardware/gesture back press viapush_back_press, and the facade’sBackHandlerreads it viaback_pressesto pop a navigator;set_handles_back/handles_backare the “framework consumes the next back” flag a shell polls to decide whether a root-level back falls through to the platform. App code normally usesattach_back_handlerrather than these directly;push_back_pressis also the desktop dev seam (no shell writes on desktop yet). Publish whether the framework will consume the next back press (see the module docs’handles_backsection). The facade’sBackHandlercalls this each rebuild withcontroller.can_pop(); a shell reads the answer viahandles_back. - set_
selection_ toolbar_ builder - The selection-toolbar seam: the request a text field publishes when it
has a selection (
SelectionToolbarRequest/SelectionToolbarActions), and the knobs that decide who draws it. - set_
selection_ toolbar_ policy - The selection-toolbar seam: the request a text field publishes when it
has a selection (
SelectionToolbarRequest/SelectionToolbarActions), and the knobs that decide who draws it. - set_
system_ ui_ mode - App-facing system-UI (system-bar) override:
set_system_ui_moderequests a status-/navigation-bar visibility mode — the FlutterSystemChrome.setEnabledSystemUIModeanalog — reaching whichever shell is running the next time it polls (once per frame, mirroringset_app_theme’s delivery timing). Seefrust_shell_common::system_ui’s module docs for the full layering rationale, the thread contract (a plainMutex-guarded process-global, callable from any thread), the FFI wire format each mobile shell exports, and where Android/iOS diverge from the five-mode vocabulary. - shell_
route - The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - shield
- Platform-view embedding (platform-views feature): reserve
layout space for a native view (a map, a video player, …) composited
alongside the frust surface.
platform_viewtakes the"dev.frust.<Factory>"-style native factory name registered on each platform and returns a builder (PlatformViewView) over the params/size contract — flat-re-exported fromfrust-widgetsso app code never names that crate directly. - signal
- Creates an arena-allocated signal, the basic reactive primitive.
- slider
- Create a slider at
value(clamped to0.0..=1.0) that fireson_change(state, new_value)as it is dragged. - spawn
- Spawns a
Sendfuture on the background reactive runtime (Tokio-backed — seefrust_reactive::ReactiveRuntime). A thin wrapper overany_spawner::Executor::spawn; app authors never nameany_spawner. - spawn_
blocking - The heavy-work idiom:
AsyncValuestate,use_task(the blessed load/compute helper),UseTaskhandle, andspawn_blocking(the CPU-bound entry point) — Frust’s counterpart to Flutter’scompute()/FutureBuilder, with explicit cancellation on component teardown.spawn_blockingjoins the existingspawn/spawn_localrouting pair (async IO / UI-thread!Send/ one-off CPU work). App crates need no new dependency: this is the whole heavy-work surface. Seefrust_reactive::taskfor the threading contract. Runs a one-off, blocking CPU workload on the background runtime’s blocking thread pool, returning aJoinHandleto.awaitits result. - spawn_
local - Spawns a
!Sendfuture on the UI-thread local task queue, drained each frame by the shell (ReactiveRuntime::pump_local). A thin wrapper overany_spawner::Executor::spawn_local; must be called on the UI thread — seefrust_reactive::ReactiveRuntime::pump_local’s doc for the panic this triggers off-thread. - stack
- An empty z-order stack, ready for fluent children (no
any(..)wrapping). - text
- Create a text view rendering
contentwith default styling (16px). Its glyph color defaults to the active theme’son_surfacerole, falling back to black when no theme is set; an explicitTextView::coloroverrides both. - text_
input - Create a controlled text field showing
valuethat fireson_change(state, new_text)on every edit. - use_
context - The reactive-programming vocabulary
Componentstate is built on: signals, memos, and context, flat-re-exported fromfrust-reactive/reactive_graphso app authors never name either crate directly. Extracts a context value of typeTfrom the reactive system. - use_
task - The heavy-work idiom:
AsyncValuestate,use_task(the blessed load/compute helper),UseTaskhandle, andspawn_blocking(the CPU-bound entry point) — Frust’s counterpart to Flutter’scompute()/FutureBuilder, with explicit cancellation on component teardown.spawn_blockingjoins the existingspawn/spawn_localrouting pair (async IO / UI-thread!Send/ one-off CPU work). App crates need no new dependency: this is the whole heavy-work surface. Seefrust_reactive::taskfor the threading contract. Runs a fetch, wiring a heavy-work idiom around it. - views
- Wrap an iterator of views as a
ViewSeq— the child-sequence spelling of “one child per item”, e.g.views(items.iter().map(|i| text(&i.name))).
Type Aliases§
- Color
- The color type every
ColorSchemerole is expressed in (peniko::Color), re-exported so app code can author its own color values (e.g. a custom accent palette that composes onto a baselineColorScheme) without namingpenikodirectly — the same facade-only-dependency rule the theme re-exports above follow. Construct one withColor::from_rgb8/Color::new; read its channels viaColor::components([f32; 4], straight-alpha RGBA). A convenient alias for the color type used forBrush. - Error
Builder - The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - NavWaker
- The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Page
Builder - A page builder: a cheap closure that produces the page’s view, re-run every rebuild so a retained page’s content still reconciles against live app state (the pod, and thus the page’s internal widget state, is preserved across the rebuild — only the view descriptor is rebuilt).
- Redirect
- The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Result
Callback - A pusher-registered result callback: invoked with
&mut Statewhen the page it was registered against is popped, carrying thePopResultthe pop supplied. - Route
Builder - The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Route
Params - The declarative router vocabulary (a go_router-subset layer),
flat-re-exported from
frust-widgetsso app code never names that crate directly:Routerresolves a location against aRoutetable (built viaRouteBuilder) intoResolution/ResolvedPages driving aNavigatorController, with:param/query parsing (Location/PathPattern/RouteParams), per-route/top-levelRedirects (loop-guarded atDEFAULT_REDIRECT_LIMIT), and anErrorBuilderfallback for an unmatched location. - Task
Error - The heavy-work idiom:
AsyncValuestate,use_task(the blessed load/compute helper),UseTaskhandle, andspawn_blocking(the CPU-bound entry point) — Frust’s counterpart to Flutter’scompute()/FutureBuilder, with explicit cancellation on component teardown.spawn_blockingjoins the existingspawn/spawn_localrouting pair (async IO / UI-thread!Send/ one-off CPU work). App crates need no new dependency: this is the whole heavy-work surface. Seefrust_reactive::taskfor the threading contract. The boxed error anAsyncValue::Errorcarries.Arc-wrapped so a clone of the state is cheap and the error is shareable across the tree. - Visibility
Callback - A page-visibility observer, registered per page via
PushOptions::on_visibility(orNavigatorView::on_root_visibilityfor the root page). Fired by the navigator from a rebuild whenever the page’sPageVisibilitychanges — never twice with the same value.