Skip to main content

InkResponse

Struct InkResponse 

Source
pub struct InkResponse {
Show 40 fields pub key: Option<KeyRef>, pub child: Option<WidgetRef>, pub on_tap: Option<GestureTapCallback>, pub on_tap_down: Option<GestureTapDownCallback>, pub on_tap_up: Option<GestureTapUpCallback>, pub on_tap_cancel: Option<GestureTapCallback>, pub on_double_tap: Option<GestureTapCallback>, pub on_long_press: Option<GestureLongPressCallback>, pub on_long_press_up: Option<GestureLongPressUpCallback>, pub on_secondary_tap: Option<GestureTapCallback>, pub on_secondary_tap_down: Option<GestureTapDownCallback>, pub on_secondary_tap_up: Option<GestureTapUpCallback>, pub on_secondary_tap_cancel: Option<GestureTapCallback>, pub on_tertiary_tap_down: Option<GestureTapDownCallback>, pub on_tertiary_tap_up: Option<GestureTapUpCallback>, pub on_tertiary_tap_cancel: Option<GestureTapCancelCallback>, pub on_highlight_changed: Option<ValueChanged<bool>>, pub on_hover: Option<ValueChanged<bool>>, pub mouse_cursor: Option<MouseCursorRef>, pub contained_ink_well: bool, pub highlight_shape: BoxShape, pub radius: Option<f64>, pub border_radius: Option<BorderRadius>, pub custom_border: Option<ShapeBorderRef>, pub focus_color: Option<Color>, pub hover_color: Option<Color>, pub highlight_color: Option<Color>, pub overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>, pub splash_color: Option<Color>, pub splash_factory: Option<InteractiveInkFeatureFactoryRef>, pub enable_feedback: bool, pub exclude_from_semantics: bool, pub on_focus_change: Option<ValueChanged<bool>>, pub autofocus: bool, pub focus_node: Option<FocusNodeRef>, pub can_request_focus: bool, pub states_controller: Option<Ref<MaterialStatesController>>, pub hover_duration: Option<Duration>, pub get_rect_callback: GetRectCallback, pub debug_check_context: CheckContext,
}
Expand description

An area of a Material that responds to touch. Has a configurable shape and can be configured to clip splashes that extend outside its bounds or not.

For a variant of this widget that is specialized for rectangular areas that always clip splashes, see InkWell.

An InkResponse widget does two things when responding to a tap:

  • It starts to animate a highlight. The shape of the highlight is determined by highlight_shape. If it is a BoxShape::Circle, the default, then the highlight is a circle of fixed size centered in the InkResponse. If it is BoxShape::Rectangle, then the highlight is a box the size of the InkResponse itself, unless get_rect_callback is provided, in which case that callback defines the rectangle. The color of the highlight is set by highlight_color.

  • Simultaneously, it starts to animate a splash. This is a growing circle initially centered on the tap location. If this is a contained_ink_well, the splash grows to the radius while remaining centered at the tap location. Otherwise, the splash migrates to the center of the box as it grows.

The main thing to notice is that the splashes happily exceed the bounds of the widget (because contained_ink_well is false).

The InkResponse widget must have a Material widget as an ancestor. The Material widget is where the ink reactions are actually painted. This matches the Material Design premise wherein the Material is what is actually reacting to touches by spreading ink.

If a Widget uses this class directly, it should include the following line at the top of its build function to call debug_check_has_material:

debug_assert!(debug_check_has_material(app, context));

§Troubleshooting

§The ink splashes aren’t visible!

If there is an opaque graphic, e.g. painted using a Container, Image, or DecoratedBox, between the Material widget and the InkResponse widget, then the splash won’t be visible because it will be under the opaque graphic. This is because ink splashes draw on the underlying Material itself, as if the ink was spreading inside the material.

The Ink widget can be used as a replacement for Image, Container, or DecoratedBox to ensure that the image or decoration also paints in the Material itself, below the ink.

If this is not possible for some reason, e.g. because you are using an opaque CustomPaint widget, alternatively consider using a second Material above the opaque widget but below the InkResponse (as an ancestor to the ink response). The MaterialType::Transparency material kind can be used for this purpose.

See also:

  • GestureDetector, for listening for gestures without ink splashes.
  • ElevatedButton and TextButton, two kinds of buttons in Material Design.
  • IconButton, which combines InkResponse with an Icon.

Fields§

§key: Option<KeyRef>§child: Option<WidgetRef>

The widget below this widget in the tree.

§on_tap: Option<GestureTapCallback>

Called when the user taps this part of the material.

§on_tap_down: Option<GestureTapDownCallback>

Called when the user taps down this part of the material.

§on_tap_up: Option<GestureTapUpCallback>

Called when the user releases a tap that was started on this part of the material. on_tap is called immediately after.

§on_tap_cancel: Option<GestureTapCallback>

Called when the user cancels a tap that was started on this part of the material.

§on_double_tap: Option<GestureTapCallback>

Called when the user double taps this part of the material.

§on_long_press: Option<GestureLongPressCallback>

Called when the user long-presses on this part of the material.

§on_long_press_up: Option<GestureLongPressUpCallback>

Called when the user lifts their finger after a long press on the button.

This callback is triggered at the end of a long press gesture, specifically after the user holds a long press and then releases it. It does not include position details.

Common use cases include performing an action only after the long press completes, such as displaying a context menu or confirming a held gesture.

See also:

  • on_long_press, which is triggered when the long press gesture is first recognized.
§on_secondary_tap: Option<GestureTapCallback>

Called when the user taps this part of the material with a secondary button.

See also:

  • K_SECONDARY_BUTTON, the button this callback responds to.
§on_secondary_tap_down: Option<GestureTapDownCallback>

Called when the user taps down on this part of the material with a secondary button.

See also:

  • K_SECONDARY_BUTTON, the button this callback responds to.
§on_secondary_tap_up: Option<GestureTapUpCallback>

Called when the user releases a secondary button tap that was started on this part of the material. on_secondary_tap is called immediately after.

See also:

  • on_secondary_tap, a handler triggered right after this one that doesn’t pass any details about the tap.
  • K_SECONDARY_BUTTON, the button this callback responds to.
§on_secondary_tap_cancel: Option<GestureTapCallback>

Called when the user cancels a secondary button tap that was started on this part of the material.

See also:

  • K_SECONDARY_BUTTON, the button this callback responds to.
§on_tertiary_tap_down: Option<GestureTapDownCallback>

Called when the user taps down on this part of the material with a tertiary button.

A common use case for the tertiary button is opening a link in a new tab or window with a middle click of a mouse.

See also:

  • K_TERTIARY_BUTTON, the button this callback responds to.
§on_tertiary_tap_up: Option<GestureTapUpCallback>

Called when the user releases a tertiary button tap that was started on this part of the material.

See also:

  • on_tertiary_tap_down, which is called when the tertiary button tap starts.
  • K_TERTIARY_BUTTON, the button this callback responds to.
§on_tertiary_tap_cancel: Option<GestureTapCancelCallback>

Called when the user cancels a tertiary button tap that was started on this part of the material.

See also:

  • K_TERTIARY_BUTTON, the button this callback responds to.
§on_highlight_changed: Option<ValueChanged<bool>>

Called when this part of the material either becomes highlighted or stops being highlighted.

The value passed to the callback is true if this part of the material has become highlighted and false if this part of the material has stopped being highlighted.

If all of on_tap, on_double_tap, on_long_press, and on_long_press_up become null while a gesture is ongoing, then on_tap_cancel will be fired and on_highlight_changed will be fired with the value false during the build. This means, for instance, that in that scenario State::set_state cannot be called.

§on_hover: Option<ValueChanged<bool>>

Called when a pointer enters or exits the ink response area.

The value passed to the callback is true if a pointer has entered this part of the material and false if a pointer has exited this part of the material.

§mouse_cursor: Option<MouseCursorRef>

The cursor for a mouse pointer when it enters or is hovering over the widget.

If mouse_cursor is a WidgetStateMouseCursor, WidgetStateProperty::resolve is used for the following WidgetStates:

If this property is null, WidgetStateMouseCursor::adaptive_clickable will be used.

§contained_ink_well: bool

Whether this ink response should be clipped its bounds.

This flag also controls whether the splash migrates to the center of the InkResponse or not. If contained_ink_well is true, the splash remains centered around the tap location. If it is false, the splash migrates to the center of the InkResponse as it grows.

See also:

  • highlight_shape, the shape of the focus, hover, and pressed highlights.
  • border_radius, which controls the corners when the box is a rectangle.
  • get_rect_callback, which controls the size and position of the box when it is a rectangle.
§highlight_shape: BoxShape

The shape (e.g., circle, rectangle) to use for the highlight drawn around this part of the material when pressed, hovered over, or focused.

The same shape is used for the pressed highlight (see highlight_color), the focus highlight (see focus_color), and the hover highlight (see hover_color).

If the shape is BoxShape::Circle, then the highlight is centered on the InkResponse. If the shape is BoxShape::Rectangle, then the highlight fills the InkResponse, or the rectangle provided by get_rect_callback if the callback is specified.

See also:

§radius: Option<f64>

The radius of the ink splash.

Splashes grow up to this size. By default, this size is determined from the size of the rectangle provided by get_rect_callback, or the size of the InkResponse itself.

See also:

§border_radius: Option<BorderRadius>

The border radius of the containing rectangle. This is effective only if highlight_shape is BoxShape::Rectangle.

If this is null, it is interpreted as BorderRadius::ZERO.

§custom_border: Option<ShapeBorderRef>

The custom clip border.

If this is null, the ink response will not clip its content.

§focus_color: Option<Color>

The color of the ink response when the parent widget is focused. If this property is null then the focus color of the theme, ThemeData::focus_color, will be used.

See also:

§hover_color: Option<Color>

The color of the ink response when a pointer is hovering over it. If this property is null then the hover color of the theme, ThemeData::hover_color, will be used.

See also:

§highlight_color: Option<Color>

The highlight color of the ink response when pressed. If this property is null then the highlight color of the theme, ThemeData::highlight_color, will be used.

See also:

§overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>

Defines the ink response focus, hover, and splash colors.

This default null property can be used as an alternative to focus_color, hover_color, highlight_color, and splash_color. If non-null, it is resolved against one of WidgetState::Focused, WidgetState::Hovered, and WidgetState::Pressed. It’s convenient to use when the parent widget can pass along its own WidgetStateProperty value for the overlay color.

WidgetState::Pressed triggers a ripple (an ink splash), per the current Material Design spec. The overlay_color doesn’t map a state to highlight_color because a separate highlight is not used by the current design guidelines. See https://material.io/design/interaction/states.html#pressed

If the overlay color is null or resolves to null, then focus_color, hover_color, splash_color and their defaults are used instead.

See also:

§splash_color: Option<Color>

The splash color of the ink response. If this property is null then the splash color of the theme, ThemeData::splash_color, will be used.

See also:

§splash_factory: Option<InteractiveInkFeatureFactoryRef>

Defines the appearance of the splash.

Defaults to the value of the theme’s splash factory: ThemeData::splash_factory.

See also:

§enable_feedback: bool

Whether detected gestures should provide acoustic and/or haptic feedback.

For example, on Android a tap will produce a clicking sound and a long-press will produce a short vibration, when feedback is enabled.

See also:

  • Feedback for providing platform-specific feedback to certain actions.
§exclude_from_semantics: bool

Whether to exclude the gestures introduced by this widget from the semantics tree.

For example, a long-press gesture for showing a tooltip is usually excluded because the tooltip itself is included in the semantics tree directly and so having a gesture to show it would result in duplication of information.

§on_focus_change: Option<ValueChanged<bool>>

Handler called when the focus changes.

Called with true if this widget’s node gains focus, and false if it loses focus.

§autofocus: bool

True if this widget will be selected as the initial focus when no other node in its scope is currently focused.

§focus_node: Option<FocusNodeRef>

An optional focus node to use as the focus node for this widget.

§can_request_focus: bool

If true, this widget may request the primary focus.

§states_controller: Option<Ref<MaterialStatesController>>

Represents the interactive “state” of this widget in terms of a set of WidgetStates, like WidgetState::Pressed and WidgetState::Focused.

Classes based on this one can provide their own WidgetStatesController to which they’ve added listeners. They can also update the controller’s WidgetStatesController::value however, this may only be done when it’s safe to call State::set_state, like in an event handler.

§hover_duration: Option<Duration>

The duration of the animation that animates the hover effect.

The default is 50ms.

§get_rect_callback: GetRectCallback

Dart’s getRectCallback override point, which a widget that specializes InkResponse fills through override_get_rect_callback; get_rect_callback calls it.

§debug_check_context: CheckContext

Dart’s debugCheckContext override point, which a widget that specializes InkResponse fills through override_debug_check_context.

Dart’s method is @mustCallSuper: a filler also runs InkResponse::debug_check_context.

Implementations§

Source§

impl InkResponse

Source

pub fn new() -> InkResponse

Creates an area of a Material that responds to touch; Dart’s named arguments are the setters.

Must have an ancestor Material widget in which to cause ink reactions.

Source

pub fn key(self, key: KeyRef) -> InkResponse

Dart InkResponse(key:).

Source

pub fn on_tap(self, on_tap: GestureTapCallback) -> InkResponse

Dart InkResponse(on_tap:).

Source

pub fn on_tap_down(self, on_tap_down: GestureTapDownCallback) -> InkResponse

Dart InkResponse(on_tap_down:).

Source

pub fn on_tap_up(self, on_tap_up: GestureTapUpCallback) -> InkResponse

Dart InkResponse(on_tap_up:).

Source

pub fn on_tap_cancel(self, on_tap_cancel: GestureTapCallback) -> InkResponse

Dart InkResponse(on_tap_cancel:).

Source

pub fn on_double_tap(self, on_double_tap: GestureTapCallback) -> InkResponse

Dart InkResponse(on_double_tap:).

Source

pub fn on_long_press( self, on_long_press: GestureLongPressCallback, ) -> InkResponse

Dart InkResponse(on_long_press:).

Source

pub fn on_long_press_up( self, on_long_press_up: GestureLongPressUpCallback, ) -> InkResponse

Dart InkResponse(on_long_press_up:).

Source

pub fn on_secondary_tap( self, on_secondary_tap: GestureTapCallback, ) -> InkResponse

Dart InkResponse(on_secondary_tap:).

Source

pub fn on_secondary_tap_up( self, on_secondary_tap_up: GestureTapUpCallback, ) -> InkResponse

Dart InkResponse(on_secondary_tap_up:).

Source

pub fn on_secondary_tap_down( self, on_secondary_tap_down: GestureTapDownCallback, ) -> InkResponse

Dart InkResponse(on_secondary_tap_down:).

Source

pub fn on_secondary_tap_cancel( self, on_secondary_tap_cancel: GestureTapCallback, ) -> InkResponse

Dart InkResponse(on_secondary_tap_cancel:).

Source

pub fn on_tertiary_tap_up( self, on_tertiary_tap_up: GestureTapUpCallback, ) -> InkResponse

Dart InkResponse(on_tertiary_tap_up:).

Source

pub fn on_tertiary_tap_down( self, on_tertiary_tap_down: GestureTapDownCallback, ) -> InkResponse

Dart InkResponse(on_tertiary_tap_down:).

Source

pub fn on_tertiary_tap_cancel( self, on_tertiary_tap_cancel: GestureTapCancelCallback, ) -> InkResponse

Dart InkResponse(on_tertiary_tap_cancel:).

Source

pub fn on_highlight_changed( self, on_highlight_changed: ValueChanged<bool>, ) -> InkResponse

Dart InkResponse(on_highlight_changed:).

Source

pub fn on_hover(self, on_hover: ValueChanged<bool>) -> InkResponse

Dart InkResponse(on_hover:).

Source

pub fn mouse_cursor(self, mouse_cursor: MouseCursorRef) -> InkResponse

Dart InkResponse(mouse_cursor:).

Source

pub fn radius(self, radius: f64) -> InkResponse

Dart InkResponse(radius:).

Source

pub fn border_radius(self, border_radius: BorderRadius) -> InkResponse

Dart InkResponse(border_radius:).

Source

pub fn focus_color(self, focus_color: Color) -> InkResponse

Dart InkResponse(focus_color:).

Source

pub fn hover_color(self, hover_color: Color) -> InkResponse

Dart InkResponse(hover_color:).

Source

pub fn highlight_color(self, highlight_color: Color) -> InkResponse

Dart InkResponse(highlight_color:).

Source

pub fn overlay_color( self, overlay_color: WidgetStatePropertyRef<Option<Color>>, ) -> InkResponse

Dart InkResponse(overlay_color:).

Source

pub fn splash_color(self, splash_color: Color) -> InkResponse

Dart InkResponse(splash_color:).

Source

pub fn splash_factory( self, splash_factory: InteractiveInkFeatureFactoryRef, ) -> InkResponse

Dart InkResponse(splash_factory:).

Source

pub fn on_focus_change(self, on_focus_change: ValueChanged<bool>) -> InkResponse

Dart InkResponse(on_focus_change:).

Source

pub fn focus_node(self, focus_node: FocusNodeRef) -> InkResponse

Dart InkResponse(focus_node:).

Source

pub fn states_controller( self, states_controller: Ref<MaterialStatesController>, ) -> InkResponse

Dart InkResponse(states_controller:).

Source

pub fn hover_duration(self, hover_duration: Duration) -> InkResponse

Dart InkResponse(hover_duration:).

Source

pub fn enable_feedback(self, enable_feedback: bool) -> InkResponse

Dart InkResponse(enable_feedback:).

Source

pub fn exclude_from_semantics(self, exclude_from_semantics: bool) -> InkResponse

Dart InkResponse(exclude_from_semantics:).

Source

pub fn can_request_focus(self, can_request_focus: bool) -> InkResponse

Dart InkResponse(can_request_focus:).

Source

pub fn autofocus(self, autofocus: bool) -> InkResponse

Dart InkResponse(autofocus:).

Source

pub fn child<K>(self, child: impl IntoWidget<K>) -> InkResponse

Dart InkResponse(child:).

Source

pub fn custom_border( self, custom_border: impl Into<ShapeBorderRef>, ) -> InkResponse

Dart InkResponse(customBorder:).

Source

pub fn override_get_rect_callback( self, get_rect_callback: impl Fn(&App, AnyRenderBox) -> Option<RectCallback> + 'static, ) -> InkResponse

Dart’s override of getRectCallback in a subclass: see InkResponse::get_rect_callback.

Source

pub fn override_debug_check_context( self, debug_check_context: impl Fn(&App, BuildContext) -> bool + 'static, ) -> InkResponse

Dart’s override of debugCheckContext in a subclass: see InkResponse::debug_check_context.

Dart’s method is @mustCallSuper: debug_check_context also runs InkResponse::debug_check_context.

Source

pub fn contained_ink_well(self, contained_ink_well: bool) -> InkResponse

Dart InkResponse(contained_ink_well:).

Source

pub fn highlight_shape(self, highlight_shape: BoxShape) -> InkResponse

Dart InkResponse(highlight_shape:).

Source

pub fn get_rect_callback( &self, app: &App, reference_box: AnyRenderBox, ) -> Option<RectCallback>

The rectangle to use for the highlight effect and for clipping the splash effects if contained_ink_well is true.

This method is intended to be overridden by descendants that specialize InkResponse for unusual cases. For example, TableRowInkWell implements this method to return the rectangle corresponding to the row that the widget is in.

The default behavior returns null, which is equivalent to returning the reference_box argument’s bounding box (though slightly more efficient).

Source

pub fn debug_check_context(app: &App, context: BuildContext) -> bool

Asserts that the given context satisfies the prerequisites for this class.

This method is intended to be overridden by descendants that specialize InkResponse for unusual cases. For example, TableRowInkWell implements this method to verify that the widget is in a table.

Trait Implementations§

Source§

impl Clone for InkResponse

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InkResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for InkResponse

Source§

fn default() -> InkResponse

Returns the “default value” for a type. Read more
Source§

impl StatelessWidget for InkResponse

Source§

fn key(&self) -> Option<&KeyRef>

Source§

fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef

Describes the part of the user interface represented by this widget. Read more
Source§

fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )

Dart’s debugFillProperties: the properties a dump shows for this widget, in Dart’s order. Dart’s Widget base only sets the dense tree style, which the framework does.
Source§

fn debug_check_constructor(&self)

Dart’s constructor asserts that relate two or more arguments. Read more
Source§

fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>

Dart’s this is PreferredSizeWidget: a widget that implements PreferredSizeWidget answers with itself, which is what a parent asking an erased child for its preferred size reads.

Auto Trait Implementations§

§

impl !RefUnwindSafe for InkResponse

§

impl !Send for InkResponse

§

impl !Sync for InkResponse

§

impl !UnwindSafe for InkResponse

§

impl Forget for InkResponse

§

impl Freeze for InkResponse
where *const RcInner<dyn Key> is !null: Freeze, PhantomData<RcInner<dyn Key>>: Freeze, *const RcInner<dyn Widget> is !null: Freeze, PhantomData<RcInner<dyn Widget>>: Freeze, *const RcInner<dyn Fn(&mut App)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze, NonZero<u32>: Freeze, *const (): Freeze, *const RcInner<dyn Fn(&mut App, TapDownDetails)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, TapDownDetails)>>: Freeze, *const RcInner<dyn Fn(&mut App, TapUpDetails)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, TapUpDetails)>>: Freeze, *const RcInner<dyn Fn(&mut App, bool)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, bool)>>: Freeze, *const RcInner<dyn MouseCursor> is !null: Freeze, PhantomData<RcInner<dyn MouseCursor>>: Freeze, *const RcInner<dyn ShapeBorder> is !null: Freeze, PhantomData<RcInner<dyn ShapeBorder>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: Freeze, *const RcInner<dyn InteractiveInkFeatureFactory> is !null: Freeze, PhantomData<RcInner<dyn InteractiveInkFeatureFactory>>: Freeze, &'static FocusNodeVTable: Freeze, *const RcInner<Keep> is !null: Freeze, PhantomData<RcInner<Keep>>: Freeze, PhantomData<fn() -> WidgetStatesController>: Freeze, *const RcInner<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>>>: Freeze, *const RcInner<dyn Fn(&App, AnyElement) -> bool> is !null: Freeze, PhantomData<RcInner<dyn Fn(&App, AnyElement) -> bool>>: Freeze,

§

impl Move for InkResponse

§

impl Unpin for InkResponse
where Rc<dyn Key>: Unpin, Rc<dyn Widget>: Unpin, Rc<dyn Fn(&mut App)>: Unpin, NonZero<u32>: Unpin, *const (): Unpin, Rc<dyn Fn(&mut App, TapDownDetails)>: Unpin, Rc<dyn Fn(&mut App, TapUpDetails)>: Unpin, Rc<dyn Fn(&mut App, bool)>: Unpin, Rc<dyn MouseCursor>: Unpin, Rc<dyn ShapeBorder>: Unpin, Rc<dyn WidgetStateProperty<Option<Color>>>: Unpin, Rc<dyn InteractiveInkFeatureFactory>: Unpin, &'static FocusNodeVTable: Unpin, Rc<Keep>: Unpin, Rc<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>>: Unpin, Rc<dyn Fn(&App, AnyElement) -> bool>: Unpin,

§

impl UnsafeUnpin for InkResponse
where *const RcInner<dyn Key> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Key>>: UnsafeUnpin, *const RcInner<dyn Widget> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Widget>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, *const (): UnsafeUnpin, *const RcInner<dyn Fn(&mut App, TapDownDetails)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, TapDownDetails)>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, TapUpDetails)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, TapUpDetails)>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, bool)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, bool)>>: UnsafeUnpin, *const RcInner<dyn MouseCursor> is !null: UnsafeUnpin, PhantomData<RcInner<dyn MouseCursor>>: UnsafeUnpin, *const RcInner<dyn ShapeBorder> is !null: UnsafeUnpin, PhantomData<RcInner<dyn ShapeBorder>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: UnsafeUnpin, *const RcInner<dyn InteractiveInkFeatureFactory> is !null: UnsafeUnpin, PhantomData<RcInner<dyn InteractiveInkFeatureFactory>>: UnsafeUnpin, &'static FocusNodeVTable: UnsafeUnpin, *const RcInner<Keep> is !null: UnsafeUnpin, PhantomData<RcInner<Keep>>: UnsafeUnpin, PhantomData<fn() -> WidgetStatesController>: UnsafeUnpin, *const RcInner<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&App, AnyRenderBox) -> Option<Rc<dyn Fn(&App) -> Rect>>>>: UnsafeUnpin, *const RcInner<dyn Fn(&App, AnyElement) -> bool> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&App, AnyElement) -> bool>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<W> IntoWidget<StatelessKind> for W
where W: StatelessWidget,

Source§

fn into_widget(self) -> Rc<dyn Widget>

The widget as a tree node, made where this is called: its creation_location.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>