Skip to main content

Crate incular_runtime

Crate incular_runtime 

Source
Expand description

Controlled BUILD → LAYOUT → PAINT coordination and local reactive state.

Modules§

devtools_registry

Structs§

AccessibilityDiagnostics
Per-native-window health counters. They intentionally contain no private labels, descriptions, or text-field values.
AccessibilitySnapshot
Action
An explicitly dispatched asynchronous operation with reactive lifecycle state. The operation is never started merely because the action is read.
ActivationRouteBridge
Keeps the deliberate application-activation to Router bridge alive.
Application
Owns application services, one Tokio runtime, and multiple retained roots. A root’s environment, input/focus, semantics, compositor, frame work, and cancellation scope are window-local; assets, Signals, and Tokio are shared.
ApplicationActivationService
Cloneable application-scoped activation stream.
ApplicationActivationSubscription
Owns one activation listener for as long as it should remain subscribed.
ApplicationDiagnostics
Aggregate lifecycle and stale-command diagnostics for an application.
ApplicationShellRequestId
ApplicationShellService
BudgetStatistics
BuildContext
Framework-controlled build scope for declarative roots. It intentionally exposes no element IDs or scheduler handles. Signals use the runtime’s scoped collector while a builder executes; reads outside a build simply return the current value and create no dependency.
ClaimedRestorationScope
Live claim on one stable restoration scope path. Dropping releases the path so a later mount may claim it; see RestorationHandle::claim_scope.
EditingDiagnostics
Effect
An owner-mounted side effect. Effects never run as part of a widget build; Effect::mount queues the initial run for the runtime’s reactive phase.
EventTarget
FileDialogRequest
Awaitable typed result for one native file dialog.
FileDialogService
Cloneable, window-associated application service for native file dialogs. Requests contain no native parent handle; the desktop host resolves the WindowId to the real parent only when it starts the native dialog.
FileRestorationStore
File-backed default persistence store. A new snapshot is completely flushed to a temporary sibling and then renamed into place. On platforms where replacement cannot be atomic, the rename fails rather than deleting the only known-good file; the next mutation may retry it. This guarantees that a reported failed save never overwrites the previous valid snapshot, while filesystem/power-loss durability remains platform/filesystem-specific.
FocusDiagnostics
Debug-facing focus state without exposing native event-loop details.
FrameHistory
Fixed-capacity ring of recent frames. Capacity is clamped to [300, 1000]; insertion never allocates beyond the initial buffer.
FrameRecord
One observed frame: identity, timings, work counters, budget verdict.
FrameStatistics
Bounded statistics over retained frame history.
FrameStats
FrameTimings
Monotonic per-phase CPU durations for exactly one frame, in microseconds.
FrameWork
Structural work executed during one frame (deltas, not totals).
GlobalShortcutRegistration
RAII ownership of one active native global shortcut.
GlobalShortcutRegistrationRequest
GlobalShortcutRequestId
GlobalShortcutService
GlobalShortcutUnregistrationRequest
GpuResourceSummary
Shared and per-window GPU residency snapshot reported by the adapter without rendering. Plain integers only — like RenderFrameMetrics, platform adapters convert backend-specific statistics into this compact snapshot so the runtime never depends on a particular GPU backend. Shared counts describe the device-owned caches; local_* counts describe the queried window’s retained bindings. Cumulative rasterized and eviction counters sit alongside current residency so tests and hosts can separate what is retained now from what has happened.
GpuSample
Optional non-blocking GPU timing sample forwarded by the adapter.
HotPatch
A compiled patch produced by the build driver for one running process.
HotPatchError
The patch library could not be loaded into the process.
InMemoryRestorationStore
Deterministic store for tests and embedding. It also supports injected write failures so crash-safety behaviour can be verified without a real user directory.
LifecycleTransition
A lifecycle update normalized by a platform adapter.
LogBatch
Records drained from the queue plus how many were dropped since the last drain.
LogQueue
Bounded drop-oldest queue. Public so hosts and tests can own private instances.
LogRecord
One queued application log record.
Memo
A lazily evaluated, cached value derived from one or more super::Signals or other reactive values.
MemoryApplicationShellAdapter
MemoryFileDialogAdapter
Deterministic in-memory host for headless integration tests and custom embedders. Scripted outcomes are consumed FIFO and the adapter records the exact portable requests it received.
MemoryGlobalShortcutAdapter
Deterministic native-side adapter for tests and non-OS embedders.
NativeApplicationShellCompletion
NativeApplicationShellRequest
NativeFileDialogCompletion
Completion returned by a desktop host on the application’s UI/event-loop thread. Late completions are rejected by request/window identity.
NativeFileDialogRequest
Native-handle-free request passed from the runtime to a desktop host.
NativeGlobalShortcutCompletion
NativeGlobalShortcutRequest
NativeOperationRequest
Awaitable result of one native platform operation.
NotificationHandle
OutletId
Identity of one RouteOutlet, for actionable error data and host bookkeeping. Assigned once per outlet; sibling outlets sharing one tree never collide.
PerformanceHub
Shared, observable view of the latest PerformanceSnapshot.
PerformanceProfiler
Per-application profiling coordinator. Lives off the hot path except for one record call per frame.
PerformanceSnapshot
Machine-readable aggregate of everything the framework measured. Produced only on demand; building one allocates and is never done in the hot path.
RenderFrameMetrics
Renderer-reported metrics for exactly one presented or skipped frame. Platform adapters convert backend-specific statistics into this compact snapshot so the runtime never depends on a particular GPU backend.
Restorable
A typed, opt-in persistent value built on the existing local Signal primitive. Mutations through this wrapper update the snapshot; an ordinary Signal stays non-persistent by default.
RestorationConfig
Stable configuration for an opt-in application restoration session.
RestorationDiagnostics
Value-free restoration health and write-coalescing diagnostics.
RestorationHandle
Cloneable UI-thread capability for explicit restoration actions. It is safe to retain in callbacks: operations update only the in-memory declarative snapshot and schedule normal Tokio-backed persistence work.
RestorationStoreError
Error reported by a persistence store. Store errors are diagnostics, not application-fatal failures.
RouteFocusState
Remembers which element was focused per route and restores it on return.
RouteOutlet
Mounts one Navigator as presentation-aware stack content.
RouteTaskBinding
Couples one task scope to one navigation route lifetime.
Runtime
Retained application execution, input dispatch and frame coordination.
RuntimeDiagnostics
Diagnostics of Incular/Tokio integration, not Tokio’s internal executor.
RuntimeErrorReport
Runtime-level failure report intended for application logging/telemetry hooks. Framework panics never unwind into the native event-loop callback.
RuntimeSpawner
UI-thread-only helper that launches application work with Incular owner tracking.
SchedulerCounters
Aggregated counter snapshot for scheduler/reactivity behavior.
Screenshot
A screenshot of an Incular window’s rendered surface.
Signal
Shared state. A read in a registered builder subscribes that Element.
SignalRegistration
Simulation
A cloneable in-process controller for one Incular application window.
Task
A typed UI-observable result of a application task. This wrapper adds ownership and cancellation metadata; it does not implement Future or duplicate Tokio’s join API.
TaskHandle
A cancellation and diagnostics handle for application work tracked by Incular. It intentionally is not another JoinHandle: use TokioHandle for direct Tokio APIs when component ownership is not required.
TaskScope
Structured Incular ownership for application tasks. Scopes may be associated with a generational element identity; completions verify that identity on the UI thread before running a local callback.
TextCacheSnapshot
TransientPresentationResolution
Read-only resolved state for one visible semantic transient.
TrayItemHandle
UiDispatcher
Cross-thread dispatcher into the unique UI owner. It is a message sender, not access to Runtime, and does not imply a redraw.
UndoHistoryController
A cloneable, widget-independent undo/redo controller for text editing.
UndoHistoryState
Observable availability state for an UndoHistoryController.
WidgetWorkSnapshot
Subset of retained-tree counters relevant to invalidation contracts.
WindowDiagnostics
Debug-facing, native-free state of one retained application window.
WindowHandle
A thread-safe reference to a generational Incular window. Methods only enqueue data for the UI/event-loop turn; they never touch native state.
WindowOpener
Cloneable UI-side capability for opening retained windows after startup. It contains no native handle and can be retained by button callbacks; native creation is still queued for the active desktop event-loop callback.
WindowPerformance
Read-only performance view of one retained window.
WindowRestorationId
Application-defined identity for a window that should survive a restart. It is intentionally unrelated to the session-local generational window ID.

Enums§

ActionDispatchError
Error returned when an action is dispatched before it has been observed by or mounted into an Incular application.
ActionError
Failure from an Action operation or from the Incular task runtime.
ActionState
UI-observable lifecycle state for an Action.
ApplicationLifecycle
Backend-neutral application lifecycle. Desktop adapters may only emit a subset; runtime users must therefore treat transitions as advisory rather than assume every state is observable on every platform.
AsyncState
A small application-state value for asynchronous results. It is not an executor; applications normally store it in a Signal from a UI callback. The error type is application-owned so callers can preserve structured domain failures instead of converting everything to a string or a framework-specific snapshot.
EditableSignalKind
FileDialogCompletionStatus
GlobalShortcutCompletionStatus
LastWindowPolicy
Policy applied after a close accepts the final visible Incular window. ExitOnLastWindow is the default so a hidden auxiliary window cannot keep an application alive accidentally. KeepRunning is explicit headless or background-service policy; a native adapter remains free to wait idle.
LogLevel
Severity of an application log record.
NativeApplicationShellApplyResult
Whether a native shell request finished during the current event-loop turn or will report its result asynchronously through the shell completion sink.
NativeApplicationShellEvent
NativeApplicationShellOperation
NativeGlobalShortcutOperation
NativeOperationCompletionStatus
Runtime disposition after a backend reports one native completion.
NativeWindowCommand
A portable UI-thread command emitted by the application for a native desktop adapter. It contains Incular IDs and options only—never Winit IDs, native pointers, or a GPU surface.
OutletAttachError
Why a nested outlet attachment was rejected.
OutletError
A route outlet refusing to present.
OutletPlacement
How the outlet presents one route, derived from its RoutePresentation.
ProfilerMode
How much profiling state the framework retains per frame.
ResolvedTransientPresentation
Presentation actually selected by the native adapter for one retained transient during its current visible lifetime.
SimulationError
Failure returned by an in-process simulation command.
TaskFailure
Failure of Tokio-backed work as observed by the UI owner.
TextShortcutPlatform
The platform whose DefaultTextEditingShortcuts table applies to text fields (Flutter’s defaultTargetPlatform).
TransientFallbackReason
Why an Auto transient is currently using the owning view’s overlay.
WindowCommandEnqueueError
Failure to enqueue a window command into the runtime/UI bridge.
WindowError
Failure while creating or addressing an Incular-owned window.
WindowPlacementError

Constants§

DEFAULT_RESTORATION_DEBOUNCE
Normal local-state debounce. Writes are coalesced and happen on Tokio’s blocking pool, never on an ordinary UI mutation.
DEFAULT_RESTORATION_SNAPSHOT_LIMIT
A deliberately generous bound for small declarative session state. This is not a database or a place for files, images, credentials, or tokens.
FRAMEWORK_RESTORATION_FORMAT_VERSION
The Incular-owned snapshot format. It is intentionally independent from the application’s own restoration schema version.
LOG_MESSAGE_LIMIT
Maximum message length in bytes; longer messages are truncated.
LOG_QUEUE_CAPACITY
Maximum queued records before the oldest is dropped.
MAX_RESTORATION_SAVE_RETRIES
Maximum number of automatic retry attempts after a failed save. Retries use bounded exponential backoff; a new mutation always schedules a normal debounced save regardless of this counter.
PERFORMANCE_OVERLAY_KEY
Widget key that marks the performance-overlay mount point.
RESTORATION_RETRY_BACKOFF
Base delay for the bounded retry backoff.

Traits§

RestorationStore
Small persistence boundary for restoration snapshots. Implementations must leave the previous valid snapshot untouched when save returns an error.
RuntimeWake
Native event-loop wake bridge. Implementations are thread-safe and must never borrow the retained UI runtime directly.

Functions§

aslr_reference
Address of the executable’s entry symbol in this process. A build driver subtracts it from the address it recorded at link time to undo address space layout randomization.
drain_logs
Drains up to max queued records from the process-wide queue. Backend API for desktop hosts.
log
Queues an application log record for the DevTools console. Never blocks on I/O, allocates a bounded amount, and is safe from any thread. No-op without the devtools feature.
logs_pending
True while records remain queued. Backend API for desktop hosts.
scheduler_counters
set_log_wake
Registers the host callback that wakes the event loop when records are queued. Backend API for desktop hosts.
sleep
Completes after duration on every target: a Tokio timer natively and a setTimeout in browsers.

Type Aliases§

ApplicationActivationListener
Retained callback for application activations.
AsyncValue
Backwards-compatible task failure state. New application code should use AsyncState<T, E> with its own error type; this alias is retained for task handles whose cancellation errors are owned by the runtime.
RestorableBool
Flutter’s RestorableBool.
RestorableBoolN
Flutter’s RestorableBoolN.
RestorableDouble
Flutter’s RestorableDouble.
RestorableDoubleN
Flutter’s RestorableDoubleN.
RestorableInt
Flutter’s RestorableInt.
RestorableIntN
Flutter’s RestorableIntN.
RestorableString
Flutter’s RestorableString.
RestorableStringN
Flutter’s RestorableStringN.
RestorableWindowFactory
Application-owned factory for a persisted auxiliary window kind. It is registered in memory at startup; it is never serialized.
RestorationMigration
Application-owned migration invoked before any restored value is exposed to a UI build. It receives the old schema version and the complete JSON document; failures safely fall back to default state.
RouteFocusOwner
Maps a mounted element to the route that owns it.
TokioHandle
The explicit Tokio handle exposed for advanced libraries. Direct tasks use Tokio/application lifetime; they are not automatically component-scoped.