Skip to main content

Module api

Module api 

Source

Modules§

animation
Animation primitives: interpolation, easing curves, transition queues, and timelines. See also: properties.ease_to and properties.ease_to_later.
application
Root initialization and application lifetime, independent of any async executor.
application_shutdown
Retained asynchronous resource cleanup with UI-thread ownership and host wakeups.
async_runtime
Executor-neutral task lifetimes and bounded delivery to the UI thread.
color
Color and opacity types used by Pax style properties and render backends.
constants
Compiler-facing type and property spelling constants.
cursor
drawing
Vector drawing primitives: paths, fills, strokes, caps, and gradients.
events
Event payloads and cancellation wrappers passed to Pax event handlers.
http_api
Shared request and response types for Pax’s public HTTP service.
layout
Layout units, axes, and common properties shared by renderable nodes.
math
paste
github crates-io docs-rs
pax_value
platform
Platform, viewport, and coordinate-space marker types.
properties
refcell_debug
reflection
rendering
Rendering backend contracts and helpers for drawing Pax scene content.
serde
Serde
store
Typed stores owned by mounted nodes and discovered through NodeContext.
transform
Rotation and 2D transform types used by layout and rendering.
unit_value
Normalized unit-domain values.
variables
LocalProperty adapters that expose runtime values to expression scopes.

Macros§

borrow
borrow_mut
impl_default_coercion_rule
Implements coercion by converting the selected PaxValue variant’s contents. The optional third argument opts into CoercionRules::is_identity_roundtrip; omit it unless the type satisfies that method’s exact, side-effect-free contract.
impl_to_pax_value
use_RefCell

Structs§

Accel
Current device acceleration, in meters per second squared.
AccelInterruptArgs
Device acceleration payload, in meters per second squared.
AddedLayerArgs
Chassis acknowledgement that render layers were added.
AlphaMaskPaint
One vector paint contributing alpha to a mask, in local path coordinates. Color channels do not affect coverage; fill alpha and opacity are multiplied.
AnyCreatePatch
Common creation payload shared by native element families.
AppClosed
Completion of retained application cleanup. This observer does not own the application and never blocks the UI thread.
AppContext
Weak access to the application that owns a node. Cloning this context does not keep an application active. This context stays local and provides no dependency lookup.
AppOptions
Resource limits and cleanup diagnostics for one application instance. These options never construct an executor or register application services.
AppleLiquidGlassPatch
Apple-specific native liquid-glass effect payload.
AsyncLimits
Application resource limits. Counts do not bound the byte size of user values.
AsyncScope
Local lifetime controller. Cancellation revokes descendants before requesting task abortion. Keep a component’s scope from its mount context when handlers later receive contexts for child controls.
BrowserConfigInterruptArgs
Browser capability flags discovered by the web chassis.
ButtonClick
User activates a native button by click or tap.
ButtonPatch
Create/update patch for a native button.
ChassisResizeRequestArgs
Chassis response containing measured native control bounds.
CheckboxChange
User checks or unchecks a checkbox.
CheckboxPatch
Create/update patch for a native checkbox.
CheckboxStyleMessage
Style payload shared by checkbox-like controls.
Click
User activates an element with a mouse click or single-touch tap.
ClickInterruptArgs
Click interrupt payload.
Closed
A rejected publication retains the caller’s value.
CommonProperties
Properties shared by every renderable Pax node.
CommonProperty
Completion
Single-use producer. Dropping it unused releases the callback on the UI turn.
ContextMenu
User right-clicks an element to open the context menu.
ContextMenuInterruptArgs
Context-menu interrupt payload.
Depth
Logical scene depth for lighting calculations.
DoubleClick
User double-clicks a mouse button over an element.
DoubleClickInterruptArgs
Double-click interrupt payload.
Drop
User drops a file-like payload over an element.
DropFileArgs
File-drop interrupt payload.
DropdownPatch
Create/update patch for a native dropdown/select element.
Event
Event wrapper passed to Pax event handlers.
EventBlockerPatch
Create/update patch for a native hit-test blocker with an optional solid background.
Fill
One interior paint layer. Index zero in an element’s fill stack is topmost.
Focus
Window or component focused.
FocusInterruptArgs
Focus interrupt marker payload.
FormButtonClickArgs
Native button click payload.
FormCheckboxToggleArgs
Checkbox state-change interrupt payload.
FormDropdownChangeArgs
Dropdown selection-change payload.
FormRadioListChangeArgs
Radio-list selection-change payload.
FormSliderChangeArgs
Slider value-change payload.
FormTextboxChangeArgs
Textbox committed-value change payload.
FormTextboxInputArgs
Textbox in-progress input payload.
FramePatch
Create/update patch for a native frame host.
Functions
Registry bootstrap for built-in PAXEL helper functions.
GlassSurfacePatch
Create/update patch for a materialized native liquid-glass surface.
GradientStop
A color stop for a gradient fill, defined by a position (% or px) and a color.
GuardedPublisher
A shared property writer whose commit is atomic with lifetime revocation. Cloning this handle does not acquire another registration. Raw Property clones remain deliberately unguarded.
Gyro
Current device orientation reported by a gyroscope/orientation sensor.
GyroInterruptArgs
Device orientation payload, in degrees.
ImageDataArgs
Image-load payload carrying image metadata without a byte pointer.
ImagePatch
Image-load request sent to the chassis.
ImagePointerArgs
Image-load payload carrying a pointer to chassis-owned image bytes.
InitContext
Context supplied to the ordinary root initializer on the UI owner thread. The application’s property graph is entered for the duration of the call. Construct the root promptly, then use scoped work for asynchronous loading.
InterruptBuffer
Raw FFI buffer containing serialized interrupts.
KeyDown
User is pressing a key.
KeyDownInterruptArgs
Key-down interrupt payload.
KeyPress
User presses a key that displays a character (alphanumeric or symbol).
KeyPressInterruptArgs
Key-press interrupt payload.
KeyUp
User has released a key.
KeyUpInterruptArgs
Key-up interrupt payload.
KeyboardEventArgs
Common properties in keyboard events.
LayerSurfaceScreenshotData
Completed screenshot bytes for one physical surface within a logical canvas layer.
LinearGradient
Describes a linear gradient fill with a start and end point, and a list of color stops.
LinkStyleMessage
Serializable style payload for link text.
LocalFontMessage
Local bundled font payload.
LocalProperty
An owner-thread value or computation in Pax’s reactive graph.
MaskPathPatch
One vector coverage path entry for a native occlusion mask.
MaterialParams
Tunable response parameters for a light-reactive vector material.
MeshGradient
Smooth mesh paint with 2–8 equally sized rows, each containing 2–8 anchors. Automatic shared Bézier controls interpolate the anchors and their premultiplied encoded-sRGB colors. Outside the covered mesh the paint is transparent. Folded patches replace earlier patches in row-major order. Supported by the WGPU renderer. Animate positions/colors to morph; whole Paint transitions remain crossfades.
MeshPoint
A colored anchor in a MeshGradient. Position uses ordinary pixels, percentages, or combined units, relative to the complete consumer geometry’s paint bounds. Rows describe connectivity; anchors in a row may have different y coordinates.
MessageQueue
Serializable batch of native messages emitted for one runtime tick.
MouseDown
User presses a mouse button over an element.
MouseDownInterruptArgs
Mouse-down interrupt payload.
MouseEventArgs
Common properties in mouse-backed events and normalized activation events.
MouseMove
User moves the mouse while it is over an element.
MouseMoveInterruptArgs
Mouse-move interrupt payload.
MouseOut
User moves the mouse away from an element.
MouseOutInterruptArgs
Mouse-out interrupt payload.
MouseOver
User moves the mouse onto an element.
MouseOverInterruptArgs
Mouse-over interrupt payload.
MouseUp
User releases a mouse button over an element.
MouseUpInterruptArgs
Mouse-up interrupt payload.
NativeCullPatch
Advisory native-view residency changes from the shared geometry index. The macOS host retains models and view instances, and may keep a cold view attached to preserve editing, selection, overflow, or accessibility.
NativeImagePatch
Create/update patch for a native image element.
NativeLiquidGlassScope
Runtime-inherited Apple liquid-glass effect scope.
NativeMaskPatch
Create/update patch for a native occlusion mask surface.
NativeMessageQueue
Raw FFI buffer containing serialized native messages.
NavigationPatch
Request for the chassis to navigate to a URL.
NodeContext
This runtime owner stays on the UI thread. Transfer properties or delivery handles to workers instead.
OpacityScope
One authored opacity boundary, ordered from the outermost ancestor to the painted node. Native surfaces can present independently while a canvas backend composes each scope.
Percent
Raw Percent type, which we use for serialization and dynamic traversal. At the time of authoring, this type is not used directly at runtime, but is intended for into coercion into downstream types, e.g. ColorChannel, Rotation, and Size. This allows us to be “dumb” about how we parse %, and allow the context in which it is used to pull forward a specific type through into inference.
PhotoPickerAssetArgs
Selected image metadata and optional copied bytes from a native photo picker.
PhotoPickerChange
Native photo picker completion event.
PhotoPickerInterruptArgs
Native photo picker completion payload.
PhotoPickerPatch
Create/update patch for a transparent native photo picker hit target.
PhotoPickerPhoto
One selected image returned by a native photo picker.
Property
Thread-safe application state with snapshot reads and atomic publication.
PropertyGraph
Owner-thread bridge between shared values and Pax’s local reactive graph.
Published
A transferable read-only view of published state. Reading never evaluates a UI binding. Its local computation is independent: rebinding or mutating that local result cannot publish into the original shared cell.
RadialGradient
A focal radial gradient, growing from start to the circle at end with radius.
RadioListPatch
Create/update patch for a native radio list.
RenderSurfaceUpdateArgs
Browser notification that a retained render surface must be reconfigured.
ReplayCanvasLayerUpdate
Replay invalidation for one logical canvas layer.
ResolvedMaterialParams
Plain material coefficients for one settled drawing operation.
ResolvedRadialGradient
Runtime geometry shared by radial color fills and painted alpha masks. Coordinates are local logical pixels, before the element’s affine transform.
ResolvedStroke
Plain drawing values captured before entering a rendering backend. Backends never read live shared properties while recording a frame.
RouteChangeInterruptArgs
Canonical route-location payload pushed from chassis state into the runtime.
SafeAreaInsets
Insets of the platform’s safe rectangle, in logical window pixels.
SceneAmbientLight
Resolved ambient light for one logical canvas layer.
SceneLight
Resolved light contribution for one logical canvas layer.
SceneLighting
Resolved lighting state for one logical canvas layer.
ScreenshotData
Completed screenshot bytes returned by the chassis.
ScreenshotPatch
Request to capture a screenshot from the chassis.
Scroll
Scroll is the shared delta-based path for wheel scrolling, touch swipe gestures, and read-only native scroller position changes. Use Wheel or TouchMove when you need platform-specific details instead of the normalized delta stream.
ScrollInterruptArgs
Location-targeted scroll delta payload.
ScrollerPatch
Create/update patch for a native/browser-owned scroller.
ScrollerPositionInterruptArgs
Native scroller position payload, including optional presentation offsets.
SelectStart
A native text selection is beginning.
SelectStartArgs
Selection-start interrupt marker payload.
SetCursorPatch
Request for the chassis to update cursor style.
ShutdownComplete
Transferable signal. Dropping it without acknowledgement reports failure.
ShutdownTicket
Nonblocking acknowledgement of retained cleanup. A pending ticket retains its owner and all earlier dependencies; a deadline never fabricates completion. An explicit Err acknowledges quiescence with a cleanup error. Dropping the signal is not acknowledgement and leaves dependencies retained.
SliderChange
User changes a slider’s value.
SliderPatch
Create/update patch for a native slider.
Stroke
One centered outline layer, drawn above every interior fill. Index zero in an element’s stroke stack is topmost.
SystemFontMessage
System font family payload.
TapInterruptArgs
Single-touch tap payload normalized to window coordinates.
TargetInfo
Derived target facts exposed to PAXEL and Rust event handlers.
TaskControl
UI-owned task control; dropping it does not detach work from its scope.
TextInput
User types into a text input field.
TextInputArgs
Raw text input payload delivered by a native text control.
TextMeasurementResponseArgs
Chassis response to an engine-authored native text measurement request.
TextPatch
Create/update patch for native or browser-managed text.
TextStyleMessage
Serializable text style payload shared with chassis text renderers.
TextboxChange
User changes the text in a text input field.
TextboxInput
Text input reported while the user edits a textbox.
TextboxPatch
Create/update patch for a native textbox.
Timeline
Minimal timeline state used by animation-oriented controls.
Touch
Represents a single touch event.
TouchCancel
A TouchCancel occurs when the platform aborts an active touch sequence before normal release, such as during a system interruption or host-level gesture cancellation.
TouchCancelInterruptArgs
Touch-cancel interrupt payload.
TouchEnd
A TouchEnd occurs when the user stops touching an element. The contained touches represent a list of touch points and the event targets, then releases, the node captured at touch start.
TouchEndInterruptArgs
Touch-end interrupt payload.
TouchMessage
One touch point in a multi-touch interrupt.
TouchMove
A TouchMove occurs when the user moves while touching an element. The contained touches represent a list of touch points and the event targets the node captured at touch start, even when the point has moved outside its bounds.
TouchMoveInterruptArgs
Touch-move interrupt payload.
TouchStart
A TouchStart occurs when the user touches an element. The contained touches represent a list of touch points. The hit node is captured for the touch identifier so subsequent move and end events keep routing to the same subtree.
TouchStartInterruptArgs
Touch-start interrupt payload.
Transform2D
A sugared representation of an Affine transform combined with an anchor layout property.
TransitionManager
TransitionQueueEntry
UiSender
Transferable producer for a bounded UI channel. Its callback stays local.
UiSubscription
Keeps a UI channel subscribed. Drop closes it and releases its local callback.
Variable
Runtime property adapter used by expression scopes.
Vector3
A three-dimensional vector in logical scene space.
Viewport
Struct representing the outermost viewport of a rendering scene, for example a browser window or native application window.
ViewportProximityChange
A settled geometry change during a continuous proximity visit.
ViewportProximityEnter
Entry into global viewport proximity, including initially nearby targets. Delivered before the initial change event. This local event does not bubble.
ViewportProximityExit
Departure from global viewport proximity, after the terminal change event. Unmount cancels observation without synthesizing a geometric exit.
ViewportProximitySnapshot
One settled viewport-proximity sample in logical window coordinates.
ViewportResizeArgs
Layout viewport resize payload for the root app surface.
VisualViewportUpdateArgs
Browser visual viewport payload for page-scroll-backed root scrollers.
WebFontMessage
Web font payload, including family and source URL.
Wheel
User scrolls the mouse wheel over an element.
WheelInterruptArgs
Wheel interrupt payload.
Window
Phantom coordinate space representing the outer window.
YoutubeVideoPatch
Create/update patch for an embedded YouTube video.

Enums§

AppPhase
The activation and teardown state of one cartridge instance.
AsyncError
New work was rejected before it could start or reserve resources.
Axis
Model of 2D cartesian axes, used to disambiguate calculations that depend on axis direction (e.g. width vs height)
Color
Entrypoint for specifying and representing colors in Pax.
ColorChannel
Describes a color channel in a unit appropriate to the surrounding color model.
ColorMessage
Serializable color payload for native/chassis messages.
Duration
A duration used by animation and transition systems.
EasingCurve
Pre-built easing curves for use in transitions, as well as a Custom variant that can be used to specify an arbitrary easing curve via a function f: f64 -> f64 mapping a time on the unit interval to a multiplier on the unit interval.
FontPatch
Serializable font selection payload.
FontStyleMessage
Serializable font-style value.
FontWeightMessage
Serializable font-weight value.
ImageLoadInterruptArgs
Image-load response, either by pointer or copied metadata.
Layer
Render layer selected for a primitive or native surface.
LayoutRole
Controls whether a node participates in parent layout measurement.
LightShape
Shape of a light contribution in logical scene space.
Material
Light-reactive surface response for vector primitives.
ModifierKey
The variants of modifier keys available on keyboard-supporting platforms.
ModifierKeyMessage
Normalized keyboard modifier identifier.
MouseButton
The variants of mouse buttons available on mouse-supporting platforms.
MouseButtonMessage
Normalized mouse button identifier.
NativeInterrupt
Events and data packets sent from the chassis back into the Pax runtime.
NativeMessage
Messages emitted by the runtime to create, update, delete, or configure native/chassis resources.
NavigationTarget
Describes where to open new windows or tabs when navigating to a URL from a Link node.
Numeric
Numeric type wrapper for PAXEL and runtime polymorphic numeric operations. This broad polyfill specifically enables terse numeric operations within expressions, without the overhead of explicit typing or numeric microsyntax.
OS
Describes known operating systems / targets.
Opacity
Describes an opacity value either as normalized alpha or as a percent.
Paint
Describes how to fill vector geometry. Solid fills interpolate their RGBA channels. Other pairs crossfade sampled paints in premultiplied RGBA, preserving each gradient’s geometry and stops.
PathElement
Describes a single element of a vector path, such as a line, a point, or curve segment.
PathSmoothing
Controls optional curve smoothing for path geometry before tessellation.
PaxValue
Runtime container for polymorphic values, for evaluating PAXEL.
PhotoPickerSourceKind
Platform source used to produce a selected photo.
PhotoPickerStatus
Completion status for a native photo picker request.
Platform
Describes categories of known platforms, for differentiating certain engine behaviors.
ResolvedMaterial
Material response with no live property handles.
Rotation
Encodes a rotation in various units
Size
A spatial size value that can be either a concrete pixel value like 25px, a percent of parent bounds like 50%, or an additive/subtractive combination of the two like (100% - 10px).
StopReason
Why an application is leaving its active host.
StoreError
Failure to register or borrow a store through a NodeContext.
StrokeCap
Controls how an open stroke terminates at the exposed endpoints of a path.
StrokeJoin
Controls how stroke segments are joined at path vertices.
TaskOutcome
The callback result keeps application Result<T, E> separate from a task panic.
TaskStatus
Observable task state. A cancellation request is not proof that work stopped.
TextAlignHorizontalMessage
Serializable horizontal text alignment.
TextAlignVerticalMessage
Serializable vertical text alignment.
TrySendError
A nonblocking channel send either retains the value or accepts it exactly once.
UnitValue
A scalar value in a normalized unit domain.

Constants§

HOST_MESSAGE_LIMIT
Maximum encoded startup, request or reply size across a host boundary.

Traits§

CoercionRules
Attempts to coerce a dynamic PaxValue into a concrete Rust type.
HelperFunctions
Registers helper functions made available to PAXEL scopes.
ImplToFromPaxAny
Marker trait for types that can be stored inside PaxAny without a built-in PaxValue representation.
Interpolatable
Marks a value as able to participate in Pax property transitions.
PropertyBinding
Owner-thread binding operations used by generated component factories.
RenderContext
The drawing contract shared by Pax runtime backends.
Store
Marker trait for values published with NodeContext::provide_store.
ToPaxValue
Converts a Rust value into its built-in PaxValue representation.

Functions§

bez_path_to_svg_path_data
Convert a kurbo BezPath to a SVG-friendly drawing string
bound
paint_bounds
Stable local reference frame for paint, independent of outline width and reveal. A collapsed axis gets a centered one-logical-pixel span without adding coverage.
register_function

Type Aliases§

AppResult
A fallible application configuration result.