Expand description
Core runtime pieces for the Cranpose experiment.
Re-exports§
pub extern crate self as cranpose_core; pub use frame_clock::FrameCallbackRegistration;pub use frame_clock::FrameClock;pub use owned::Owned;pub use platform::Clock;pub use platform::RuntimeScheduler;pub use runtime::current_runtime_handle;pub use runtime::schedule_frame;pub use runtime::schedule_node_update;pub use runtime::DefaultScheduler;pub use runtime::Runtime;pub use runtime::RuntimeHandle;pub use runtime::StateId;pub use runtime::TaskHandle;pub use snapshot_state_observer::SnapshotStateObserver;pub use subcompose::ContentTypeReusePolicy;pub use subcompose::DefaultSlotReusePolicy;pub use subcompose::SlotId;pub use subcompose::SlotReusePolicy;pub use subcompose::SubcomposeState;pub use composer_context::with_composer as with_current_composer;pub use slot_backend::make_backend;pub use slot_backend::SlotBackend;pub use slot_backend::SlotBackendKind;pub use slot_table::SlotTable;
Modules§
- chunked_
slot_ storage - Chunked slot storage backend that avoids large rotate operations.
- collections
- composer_
context - frame_
clock - hash
- hierarchical_
slot_ storage - Hierarchical slot storage wrapper.
- owned
- platform
- Platform abstraction traits for Compose runtime services.
- runtime
- slot_
backend - Slot storage backend selection and unified interface.
- slot_
table - Slot table implementation using a gap-buffer strategy.
- snapshot_
double_ index_ heap - snapshot_
id_ set - snapshot_
pinning - snapshot_
state_ observer - snapshot_
v2 - Snapshot system for managing isolated state changes.
- split_
slot_ storage - Split slot storage that separates layout from payload.
- subcompose
- State tracking for measure-time subcomposition.
Macros§
Structs§
- Anchor
Id - Stable identifier for a slot in the slot table.
- Applier
Guard - Callback
Holder - CallbackHolder keeps the latest callback closure alive across recompositions. It stores the callback in an Rc<RefCell<…>> so that the composer can hand out lightweight forwarder closures without cloning the underlying callback value.
- Cancel
Token - Cooperative cancellation token passed into background
LaunchedEffectwork. - Composer
- Composition
- Composition
Local - Concrete
Applier Host - Disposable
Effect Result - Disposable
Effect Scope - GroupId
- Opaque handle to a group in the slot storage.
- Launched
Effect Scope - Memory
Applier - Mutable
State - Param
Slot - ParamSlot holds function/closure parameters by ownership (no PartialEq/Clone required). Used by the #[composable] macro to store Fn-like parameters in the slot table.
- Param
State - Provided
Value - Recompose
Options - Recompose
Scope - Return
Slot - Slots
Host - Snapshot
State List - Snapshot
State Map - Start
Group - Result of starting a group.
- State
- Static
Composition Local - A
StaticCompositionLocalis a CompositionLocal that is optimized for values that are unlikely to change. UnlikeCompositionLocal, reads of aStaticCompositionLocalare not tracked by the recomposition system, which means: - Value
Slot Id - Opaque handle to a value slot in the slot storage.
Enums§
Traits§
- Applier
- Applier
Host - Node
- Slot
Storage - Abstract slot API that the composer / composition engine talks to. Concrete backends (SlotTable with gap buffer, chunked storage, arena, etc.) implement this and can keep whatever internal layout they want.
Functions§
- Composition
Local Provider - Side
Effect - __
disposable_ effect_ impl - __
launched_ effect_ async_ impl - __
launched_ effect_ impl - bubble_
layout_ dirty - Unified API for bubbling layout dirty flags from a node to the root (Applier context).
- bubble_
layout_ dirty_ in_ composer - Unified API for bubbling layout dirty flags from a node to the root (Composer context).
- bubble_
measure_ dirty - Unified API for bubbling measure dirty flags from a node to the root (Applier context).
- bubble_
semantics_ dirty - Unified API for bubbling semantics dirty flags from a node to the root (Applier context).
- bubble_
semantics_ dirty_ in_ composer - Unified API for bubbling semantics dirty flags from a node to the root (Composer context).
- composition
Local Of - derived
State Of - dispatch_
ui_ event - Dispatches a UI event in a proper snapshot context.
- enter_
event_ handler - Marks the start of an event handler context.
Call this at the start of keyboard/mouse/touch event handling.
Use
run_in_mutable_snapshotordispatch_ui_eventinside to ensure proper snapshot handling. - exit_
event_ handler - Marks the end of an event handler context.
- in_
applied_ snapshot - Returns true if currently in an applied snapshot context.
- in_
event_ handler - Returns true if currently in an event handler context.
- location_
key - mutable
State List - mutable
State List Of - mutable
State Map - mutable
State MapOf - mutable
State Of - pop_
parent - push_
parent - queue_
semantics_ invalidation - Schedules semantics bubbling for a node using the active composer if present.
- remember
- remember
Updated State - Returns a
MutableStatethat always holds the latest value. - run_
in_ mutable_ snapshot - Runs the provided closure inside a mutable snapshot and applies the result.
- static
Composition Local Of - try_
mutable State Of - Like
mutableStateOfbut returnsNoneif no runtime is available. - useState
- use_
state Deprecated - with
Current Composer - with
Frame Millis - with
Frame Nanos - withKey
- with_
key - with_
node_ mut