Skip to main content

Crate whisker_engine

Crate whisker_engine 

Source
Expand description

Host-independent retained scene engine for Whisker

Scene owns logical nodes and their current presentation state. Mutations update that retained state and append to a coalescing change journal. At a frame boundary the scene prepares either a complete snapshot or an incremental whisker_protocol::FramePacket, then advances its accepted revision only after the renderer confirms the complete transaction.

SurfaceEngine pairs that scene with a retained Taffy layout tree. It keeps structural mutations synchronized, skips clean layout passes, and journals only geometry that changed from the previous snapshot.

RecordingRenderer is the reference Rust-only consumer. Together with whisker-protocol it lets tree, revision, recovery, and incremental-update behavior run without Android, UIKit, DOM, FFI, or WASM.

Re-exports§

pub use whisker_layout;
pub use whisker_protocol;
pub use whisker_style;

Structs§

InlineAttachmentInput
An inline subtree whose dimensions are resolved by the layout adapter.
LayoutOptions
Limit for synchronous Host batches attempted by one layout drive.
LayoutUpdate
Result of requesting one layout pass.
LoweredPaint
Complete common presentation values derived from one computed node style.
LoweredPlainText
Measurement and presentation values produced from one plain-text input.
MeasurementApply
Summary of applying immediate Host measurement responses.
PlainTextInput
Plain UTF-8 text and element inputs not supplied by computed style.
RecordedFrame
One attempted presentation and its recorded result.
RecordingRenderer
Rust-only frame receiver backed by SceneProjection.
ResolvedTextRun
One logical inline Text with fully resolved style.
Scene
Host-independent retained scene for one surface.
SceneNode
A retained logical node owned by a Scene.
SurfaceEngine
Host-independent rendering pipeline for one Whisker surface.

Enums§

DeferredMeasurementApply
Result of applying one deferred Host measurement event.
LayoutError
Failure while driving Taffy through the Rust-to-Host measurement boundary.
LayoutProgress
State reached by one Host-backed layout attempt.
MeasurementError
Failure while validating or resolving intrinsic measurement.
SceneError
A rejected scene mutation or frame-lifecycle transition.
SurfaceError
Failure while coordinating retained layout and scene state.
SurfacePresentError
Failure while presenting one prepared transaction to a Host.

Traits§

FrameSink
Semantic frame receiver used by a Scene.
MeasurementProvider
Host capability required to resolve one batch of intrinsic measurements.

Functions§

lower_color
Lowers a renderer-independent computed color into the paint protocol.
lower_paint
Lowers renderer-independent computed style into protocol-owned values.
lower_plain_text
Lowers computed inherited text style into the shared Host measurement model.
lower_rich_text
Lowers a paragraph while keeping metric and paint-only changes separate.
lower_text_style
Lowers inherited text values for a native text-capable element without creating plain-text content or a measurement registration.
lower_transform
Resolves a computed transform against one node’s border-box size.