Crate cranpose_core

Crate cranpose_core 

Source
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§

DisposableEffect
LaunchedEffect
LaunchedEffectAsync

Structs§

AnchorId
Stable identifier for a slot in the slot table.
ApplierGuard
CallbackHolder
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.
CancelToken
Cooperative cancellation token passed into background LaunchedEffect work.
Composer
Composition
CompositionLocal
ConcreteApplierHost
DisposableEffectResult
DisposableEffectScope
GroupId
Opaque handle to a group in the slot storage.
LaunchedEffectScope
MemoryApplier
MutableState
ParamSlot
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.
ParamState
ProvidedValue
RecomposeOptions
RecomposeScope
ReturnSlot
SlotsHost
SnapshotStateList
SnapshotStateMap
StartGroup
Result of starting a group.
State
StaticCompositionLocal
A StaticCompositionLocal is a CompositionLocal that is optimized for values that are unlikely to change. Unlike CompositionLocal, reads of a StaticCompositionLocal are not tracked by the recomposition system, which means:
ValueSlotId
Opaque handle to a value slot in the slot storage.

Enums§

NodeError
Phase

Traits§

Applier
ApplierHost
Node
SlotStorage
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§

CompositionLocalProvider
SideEffect
__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).
compositionLocalOf
derivedStateOf
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_snapshot or dispatch_ui_event inside 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
mutableStateList
mutableStateListOf
mutableStateMap
mutableStateMapOf
mutableStateOf
pop_parent
push_parent
queue_semantics_invalidation
Schedules semantics bubbling for a node using the active composer if present.
remember
rememberUpdatedState
Returns a MutableState that always holds the latest value.
run_in_mutable_snapshot
Runs the provided closure inside a mutable snapshot and applies the result.
staticCompositionLocalOf
try_mutableStateOf
Like mutableStateOf but returns None if no runtime is available.
useState
use_stateDeprecated
withCurrentComposer
withFrameMillis
withFrameNanos
withKey
with_key
with_node_mut

Type Aliases§

Key
NodeId