Skip to main content

Crate incular_core

Crate incular_core 

Source
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;
pub use input::additional_pointer_button_mask;

Modules§

hot_reload
Hot-patch call points for development builds.
input
Platform-neutral input event values and the standardized keyboard vocabulary. Key remains the logical keyboard key inside this module; the crate root re-exports it as KeyboardKey to 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 self code.
ArenaId
Stable slot identity. A removed slot increments its generation before reuse.
BuildContext
A scoped build context. Cloning a context keeps the same consumer identity; BuildContext::for_consumer creates a distinct dependency owner.
Color
ConsumerId
ContextGuard
Restores the previous active build scope when dropped.
DependencySnapshot
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.
KeyboardEvent
Standardized keyboard values shared by every platform adapter.
Modifiers
Standardized keyboard values shared by every platform adapter.
Offset
Rect
RestorationKey
A stable, application-provided segment in a restoration path.
RestorationScope
A restoration location supplied by the runtime to an opt-in state owner.
Size
Transform
A retained two-dimensional affine transform.
UniqueKey
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.
ValueKey
A value-based local key. ValueKey<T> is the Rust equivalent of Flutter’s ValueKey<T> while remaining useful for any Eq + Hash value.

Enums§

ChangeImpact
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.
KeyboardKey
Standardized keyboard values shared by every platform adapter.
Location
Standardized keyboard values shared by every platform adapter.
NamedKey
Standardized keyboard values shared by every platform adapter.
RestorationKeyError
Why a RestorationKey could not be created.

Traits§

BuildableWidget
Optional build contract for widget crates that want to construct a child description from a context. It is separate from Widget so 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.
LocalKey
Marker for keys whose identity is scoped to a local widget tree.
RestorationBackend
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_zero clamped 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§

DirtyFlags
Alias for Invalidation for backwards compatibility.
KeyObject
Compatibility name for value/object keys.
StringKey
Convenient string key constructor.