Expand description
Renderer- and platform-independent primitives shared by Incular.
Re-exports§
pub use input::BACK_POINTER_BUTTON;pub use input::DragStartBehavior;pub use input::FORWARD_POINTER_BUTTON;pub use input::ImeEvent;pub use input::InputEvent;pub use input::NormalizedPressure;pub use input::PRIMARY_POINTER_BUTTON;pub use input::PointerDeviceKind;pub use input::PointerPhase;pub use input::PointerSampleMetadata;pub use input::SECONDARY_POINTER_BUTTON;pub use input::StylusMetadata;pub use input::StylusOrientation;pub use input::TERTIARY_POINTER_BUTTON;pub use input::TrackpadGesture;pub use input::TrackpadGestureKind;pub use input::TrackpadGesturePhase;pub use input::WindowResizeDirection;
Modules§
- hot_
reload - Hot-patch call points for development builds.
- input
- Platform-neutral input event values and the standardized keyboard
vocabulary.
Keyremains the logical keyboard key inside this module; the crate root re-exports it asKeyboardKeyto avoid colliding with the retained widget-key trait. Platform-neutral input values. - reactivity
- Scheduler-independent dependency sources and owned subscriptions.
- time
- Monotonic and wall-clock time values that work on every Incular target.
Structs§
- Arena
- Compact safe arena used by persistent framework trees. It never exposes
references across mutations, so tree algorithms can remain ordinary
&mut selfcode. - ArenaId
- Stable slot identity. A removed slot increments its generation before reuse.
- Build
Context - A scoped build context. Cloning a context keeps the same consumer identity;
BuildContext::for_consumercreates a distinct dependency owner. - Color
- Consumer
Id - Context
Guard - Restores the previous active build scope when dropped.
- Dependency
Snapshot - A read-only summary of the dependencies currently collected for a context.
- HslColor
- Hue, saturation, lightness, and opacity in an sRGB color space.
- HsvColor
- Hue, saturation, value, and opacity in an sRGB color space.
- Invalidation
- Multi-dimensional damage invalidation representation across independent retained runtime phases.
- KeyHandle
- Cloneable type-erased key. This is the type to use in a heterogeneous key field or collection.
- KeyId
- A compact, hashable description of a concrete key.
- Keyboard
Event - Standardized keyboard values shared by every platform adapter.
- Modifiers
- Standardized keyboard values shared by every platform adapter.
- Offset
- Rect
- Restoration
Key - A stable, application-provided segment in a restoration path.
- Restoration
Scope - A restoration location supplied by the runtime to an opt-in state owner.
- Size
- Transform
- A retained two-dimensional affine transform.
- Unique
Key - A globally unique local key. It is useful for forcing a fresh element when a widget is rebuilt, and is intentionally not based on object addresses.
- Value
Key - A value-based local key.
ValueKey<T>is the Rust equivalent of Flutter’sValueKey<T>while remaining useful for anyEq + Hashvalue.
Enums§
- Change
Impact - Identifies the invalidation scope required when a property changes.
- Code
- Standardized keyboard values shared by every platform adapter.
- KeyState
- Standardized keyboard values shared by every platform adapter.
- Keyboard
Key - Standardized keyboard values shared by every platform adapter.
- Location
- Standardized keyboard values shared by every platform adapter.
- Named
Key - Standardized keyboard values shared by every platform adapter.
- Restoration
KeyError - Why a
RestorationKeycould not be created.
Traits§
- Buildable
Widget - Optional build contract for widget crates that want to construct a child
description from a context. It is separate from
Widgetso core does not force every renderer-specific widget to choose a child representation. - Key
- A type-erased identity used by widgets and reconciliation algorithms. Implementors should be immutable value types.
- Lerp
- A type that can be linearly interpolated between two values.
- Local
Key - Marker for keys whose identity is scoped to a local widget tree.
- Restoration
Backend - Raw JSON storage implemented by the runtime’s restoration manager.
- Widget
- Base contract shared by stateless and stateful widget descriptions.
Functions§
- finite_
non_ negative finite_or_zeroclamped to be non-negative, for extents, insets and radii.- finite_
or_ zero - Replaces NaN and infinities with zero so untrusted geometry cannot poison layout or rendering.
Type Aliases§
- Dirty
Flags - Alias for
Invalidationfor backwards compatibility. - KeyObject
- Compatibility name for value/object keys.
- String
Key - Convenient string key constructor.