Module prelude Copy item path Source pub use crate::DocRunner ;pub use crate::TestingRunner ;pub use crate::launch_doc ;pub use crate::launch_test ;data emittable executor measurer name platform AccessibilityData AccessibilityId The stable identity of a [Node], unique within the node’s tree. AccessibilityState AnimationClock Border BorderWidth Bytes A cheaply cloneable and sliceable chunk of contiguous memory. Callback Color Represents one color.
You may create Color s using ConicGradient CornerRadius Cursor CursorStyleData Effect EffectData EffectState Event EventHandler EventsCombos FileEventData Focus FontWeight FontWidth FutureTask GradientStop ImePreeditEventData KeyboardEventData Data of a Keyboard event. Label LayerState LayoutData LinearGradient Memo Modifiers Pressed modifier keys. MouseEventData NoArgCallback Paragraph ParagraphHolder Platform RadialGradient ReactiveContext Readable A type-erased readable state that only exposes the value type T. Rect RenderContext RenderingTicker Scale ScreenReader Shadow SizedEventData Data of a Sized event. Span State A reactive state container that holds a value of type T and manages subscriptions to changes. StyleState Svg SvgBytes SVG bytes that can be constructed from Bytes , Vec<u8> , &'static [u8],
or &'static [u8; N] (the type returned by include_bytes! ). Task TaskHandle TaskId TaskWaker TextShadow TextStyleData TextStyleState TouchEventData Data of a Touch event. UseId WheelEventData Data of a Wheel event. Writable A type-erased writable state that only exposes the value type T. AccessibilityFocusMovement Strategy focusing an Accessibility Node. AccessibilityFocusStrategy Strategy focusing an Accessibility Node. AccessibilityRole The type of an accessibility node. AspectRatio BorderAlignment BorderShape Code Code is the physical position of a key. CursorIcon Describes the appearance of the (usually mouse) cursor icon. CursorMode Determines how the cursor and highlights are positioned within a Paragraph. CursorStyle DiffKey Element EventType FileEventName Fill FocusStatus Focusable FontSlant Force FutureState ImageCover ImeEventName Interactive Key The value received from the keypress. KeyboardEventName Layer MouseButton MouseEventName NamedKey Key represents the meaning of a keypress. NavigationMode Overflow PlatformEvent Data for PlatformEvent . PointerEventData Data of a pointer event. PreferredTheme PressEventData PressEventType ReadableRef SamplingMode ShadowPosition TextAlign TextHeightBehavior TextOverflow TextWidth TouchEventName TouchPhase UserEvent VerticalAlign Vertical alignment for Paragraph text rendering. WheelEventName WheelSource AccessibilityExt AlignmentExt App App is a trait for root-level application components.
Types implementing App automatically implement Component and have a
blanket PartialEq implementation that always returns true.ChildrenExt Component Encapsulate reusable pieces of UI by using the Component trait.
Every Component creates a new layer of state in the app,
meaning that implementors of Component can make use of hooks in their Component::render method. ComponentKey ComponentOwned ContainerExt ContainerSizeExt ContainerWithContentExt ContentExt CornerRadiusExt DebugExt DirectionExt EffectExt EventHandlersExt ImageExt InteractiveExt IntoElement IntoReadable IntoWritable KeyExt LayerExt LayoutExt ListExt MaybeExt ScrollableExt SizeExt StyleExt TextStyleExt VisibleSizeExt consume_context consume_root_context current_scope_id label Draw text with label() . Its a simplified version of crate::elements::paragraph . mark_scope_as_dirty paragraph paragraph() makes it possible to render rich text with different styles. Its a more customizable API than crate::elements::label .provide_context provide_context_for_scope_id rect rect() acts as a generic container to contain other elements inside, like a box.spawn spawn_forever svg Use svg() to render SVG in your app. try_consume_context try_consume_context_from_scope_id try_consume_root_context use_after_side_effect use_consume Get access to a value stored in this component instance or some ancestor. use_drop Run a callback for when the component gets dropped. Useful to clean resources. use_focus use_focus_status use_future Creata FutureTask with the given callback. use_hook This is the foundational hook used by all. It’s simple, it accepts an initialization callback
whose return value will be stored in this component instance until its dropped.
In subsequent renders the returned value of the function will be a Clone d value of what
had been previously returned by the initialization callback. use_id Get a unique for a given generic type. use_memo Registers a callback that will run every time a State which was .read() inside, changes.
It also returning a type that will get cached after the callback runs, thus allowing this to be used as a way to cache expensive values. use_previous_and_current Track the previous and current values of a reactive value. use_provide_context Store the given value in this component instance.
Any descendant component of this component calling use_consume or consume_context will have access to it. use_reactive Convert a borrowed value (&T) into a component-scoped State<T> . use_side_effect Registers a callback that will run every time a State which was .read() inside, changes. use_side_effect_value use_side_effect_with_deps use_state Creates a reactive state value initialized with the returned value of the init callback. use_try_consume Try to get access to a value stored in this component instance or some ancestor. ReadRef WriteRef