Struct ribir_core::builtin_widgets::FatObj
source · pub struct FatObj<T> { /* private fields */ }
Expand description
A fat object that extend the T
object with all builtin widgets ability. A
FatObj
will create during the compose phase, and compose with the builtin
widgets it actually use, and drop after composed.
It’s important to understand that FatObj
is a temporary mixin object. It
doesn’t persist in the final widget tree. Therefore, you can only clone a
portion of its real widget. However, if you’re using the DSL macros, you
don’t need to worry about this.
§Example
If you want to modify the margin of a FatObj
, you need to clone the writer
of Margin
widget within it.
use ribir_core::{prelude::*, test_helper::*};
let w = |ctx: &BuildCtx| {
let mut multi = FatObj::new(MockMulti::default()).margin(EdgeInsets::all(10.));
let w = multi.get_margin_widget().clone_writer();
multi
.on_tap(move |_| w.write().margin = EdgeInsets::all(20.))
.build(ctx)
};
Implementations§
source§impl<W> FatObj<W>
impl<W> FatObj<W>
sourcepub fn left_align_to(
&mut self,
wid: &LazyWidgetId,
offset: f32,
ctx: &BuildCtx<'_>
) -> impl Subscription
pub fn left_align_to( &mut self, wid: &LazyWidgetId, offset: f32, ctx: &BuildCtx<'_> ) -> impl Subscription
Anchor the widget’s horizontal position by placing its left edge right to
the left edge of the specified widget (wid
) with the given relative
pixel value (relative
).
sourcepub fn right_align_to(
&mut self,
wid: &LazyWidgetId,
relative: f32,
ctx: &BuildCtx<'_>
) -> impl Subscription
pub fn right_align_to( &mut self, wid: &LazyWidgetId, relative: f32, ctx: &BuildCtx<'_> ) -> impl Subscription
Anchor the widget’s horizontal position by placing its right edge left to
the right edge of the specified widget (wid
) with the given relative
pixel value (relative
).
sourcepub fn top_align_to(
&mut self,
wid: &LazyWidgetId,
relative: f32,
ctx: &BuildCtx<'_>
) -> impl Subscription
pub fn top_align_to( &mut self, wid: &LazyWidgetId, relative: f32, ctx: &BuildCtx<'_> ) -> impl Subscription
Anchors the widget’s vertical position by placing its top edge below the
top edge of the specified widget (wid
) with the given relative pixel
value (relative
).
sourcepub fn bottom_align_to(
&mut self,
wid: &LazyWidgetId,
relative: f32,
ctx: &BuildCtx<'_>
) -> impl Subscription
pub fn bottom_align_to( &mut self, wid: &LazyWidgetId, relative: f32, ctx: &BuildCtx<'_> ) -> impl Subscription
Anchors the widget’s vertical position by placing its bottom edge above
the bottom edge of the specified widget (wid
) with the given relative
pixel value (relative
).
source§impl<T> FatObj<T>
impl<T> FatObj<T>
sourcepub fn map<V>(self, f: impl FnOnce(T) -> V) -> FatObj<V>
pub fn map<V>(self, f: impl FnOnce(T) -> V) -> FatObj<V>
Maps an FatObj<T>
to FatObj<V>
by applying a function to the host
object.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
sourcepub fn lazy_host_id(&self) -> LazyWidgetId
pub fn lazy_host_id(&self) -> LazyWidgetId
Return the LazyWidgetId of the host widget, through which you can access the WidgetId after building.
sourcepub fn lazy_id(&self) -> LazyWidgetId
pub fn lazy_id(&self) -> LazyWidgetId
Return the LazyWidgetId point to WidgetId of the root of the sub widget tree after the FatObj has built.
source§impl<T> FatObj<T>
impl<T> FatObj<T>
pub fn get_mix_builtin_widget(&mut self) -> &mut State<MixBuiltin>
sourcepub fn get_request_focus_widget(&mut self) -> &mut State<RequestFocus>
pub fn get_request_focus_widget(&mut self) -> &mut State<RequestFocus>
Returns the State<RequestFocus>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_has_focus_widget(&mut self) -> &mut State<HasFocus>
pub fn get_has_focus_widget(&mut self) -> &mut State<HasFocus>
Returns the State<HasFocus>
widget from the FatObj. If it doesn’t exist,
a new one is created.
sourcepub fn get_mouse_hover_widget(&mut self) -> &mut State<MouseHover>
pub fn get_mouse_hover_widget(&mut self) -> &mut State<MouseHover>
Returns the State<MouseHover>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_pointer_pressed_widget(&mut self) -> &mut State<PointerPressed>
pub fn get_pointer_pressed_widget(&mut self) -> &mut State<PointerPressed>
Returns the State<PointerPressed>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_fitted_box_widget(&mut self) -> &mut State<FittedBox>
pub fn get_fitted_box_widget(&mut self) -> &mut State<FittedBox>
Returns the State<FittedBox>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_box_decoration_widget(&mut self) -> &mut State<BoxDecoration>
pub fn get_box_decoration_widget(&mut self) -> &mut State<BoxDecoration>
Returns the State<BoxDecoration>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_padding_widget(&mut self) -> &mut State<Padding>
pub fn get_padding_widget(&mut self) -> &mut State<Padding>
Returns the State<Padding>
widget from the FatObj. If it doesn’t exist,
a new one is created.
sourcepub fn get_layout_box_widget(&mut self) -> &mut State<LayoutBox>
pub fn get_layout_box_widget(&mut self) -> &mut State<LayoutBox>
Returns the State<LayoutBox>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_cursor_widget(&mut self) -> &mut State<Cursor>
pub fn get_cursor_widget(&mut self) -> &mut State<Cursor>
Returns the State<Cursor>
widget from the FatObj. If it doesn’t exist, a
new one is created.
sourcepub fn get_margin_widget(&mut self) -> &mut State<Margin>
pub fn get_margin_widget(&mut self) -> &mut State<Margin>
Returns the State<Margin>
widget from the FatObj. If it doesn’t exist, a
new one is created.
sourcepub fn get_scrollable_widget(&mut self) -> &mut State<ScrollableWidget>
pub fn get_scrollable_widget(&mut self) -> &mut State<ScrollableWidget>
Returns the State<ScrollableWidget>
widget from the FatObj. If it
doesn’t exist, a new one is created.
sourcepub fn get_transform_widget(&mut self) -> &mut State<TransformWidget>
pub fn get_transform_widget(&mut self) -> &mut State<TransformWidget>
Returns the State<TransformWidget>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_h_align_widget(&mut self) -> &mut State<HAlignWidget>
pub fn get_h_align_widget(&mut self) -> &mut State<HAlignWidget>
Returns the State<HAlignWidget>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_v_align_widget(&mut self) -> &mut State<VAlignWidget>
pub fn get_v_align_widget(&mut self) -> &mut State<VAlignWidget>
Returns the State<VAlignWidget>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_relative_anchor_widget(&mut self) -> &mut State<RelativeAnchor>
pub fn get_relative_anchor_widget(&mut self) -> &mut State<RelativeAnchor>
Returns the State<RelativeAnchor>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_global_anchor_widget(&mut self) -> &mut State<GlobalAnchor>
pub fn get_global_anchor_widget(&mut self) -> &mut State<GlobalAnchor>
Returns the State<GlobalAnchor>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_visibility_widget(&mut self) -> &mut State<Visibility>
pub fn get_visibility_widget(&mut self) -> &mut State<Visibility>
Returns the State<Visibility>
widget from the FatObj. If it doesn’t
exist, a new one is created.
sourcepub fn get_opacity_widget(&mut self) -> &mut State<Opacity>
pub fn get_opacity_widget(&mut self) -> &mut State<Opacity>
Returns the State<Opacity>
widget from the FatObj. If it doesn’t exist,
a new one is created.
sourcepub fn get_keep_alive_widget(&mut self) -> &mut State<KeepAlive>
pub fn get_keep_alive_widget(&mut self) -> &mut State<KeepAlive>
Returns the State<KeepAlive>
widget from the FatObj. If it doesn’t
exist, a new one is created.
source§impl<T> FatObj<T>
impl<T> FatObj<T>
sourcepub fn on_event(self, f: impl FnMut(&mut Event) + 'static) -> Self
pub fn on_event(self, f: impl FnMut(&mut Event) + 'static) -> Self
Attaches an event handler to the widget. It’s triggered when any event or lifecycle change happens.
sourcepub fn on_mounted(self, f: impl FnOnce(&mut LifecycleEvent) + 'static) -> Self
pub fn on_mounted(self, f: impl FnOnce(&mut LifecycleEvent) + 'static) -> Self
Attaches an event handler that runs when the widget is first mounted to the tree.
sourcepub fn on_performed_layout(
self,
f: impl FnMut(&mut LifecycleEvent) + 'static
) -> Self
pub fn on_performed_layout( self, f: impl FnMut(&mut LifecycleEvent) + 'static ) -> Self
Attaches an event handler that runs after the widget is performed layout.
sourcepub fn on_disposed(self, f: impl FnOnce(&mut LifecycleEvent) + 'static) -> Self
pub fn on_disposed(self, f: impl FnOnce(&mut LifecycleEvent) + 'static) -> Self
Attaches an event handler that runs when the widget is disposed.
sourcepub fn on_pointer_down(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
pub fn on_pointer_down(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when a pointer down occurs.
sourcepub fn on_pointer_down_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static
) -> Self
pub fn on_pointer_down_capture( self, f: impl FnMut(&mut PointerEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a pointer down event. This is similar to on_pointer_down
, but
it’s triggered earlier in the event flow. For more information on event
capturing, see Event capture.
sourcepub fn on_pointer_up(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
pub fn on_pointer_up(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when a pointer up occurs.
sourcepub fn on_pointer_up_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static
) -> Self
pub fn on_pointer_up_capture( self, f: impl FnMut(&mut PointerEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a pointer up event. This is similar to on_pointer_up
, but it’s
triggered earlier in the event flow. For more information on event
capturing, see Event capture.
sourcepub fn on_pointer_move(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
pub fn on_pointer_move(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when a pointer move occurs.
sourcepub fn on_pointer_move_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static
) -> Self
pub fn on_pointer_move_capture( self, f: impl FnMut(&mut PointerEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a pointer move event. This is similar to on_pointer_move
, but
it’s triggered earlier in the event flow. For more information on event
capturing, see Event capture.
sourcepub fn on_pointer_cancel(
self,
f: impl FnMut(&mut PointerEvent) + 'static
) -> Self
pub fn on_pointer_cancel( self, f: impl FnMut(&mut PointerEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered when a pointer event cancels.
sourcepub fn on_pointer_enter(
self,
f: impl FnMut(&mut PointerEvent) + 'static
) -> Self
pub fn on_pointer_enter( self, f: impl FnMut(&mut PointerEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered when a pointer device is moved into the hit test boundaries of an widget or one of its descendants.
sourcepub fn on_pointer_leave(
self,
f: impl FnMut(&mut PointerEvent) + 'static
) -> Self
pub fn on_pointer_leave( self, f: impl FnMut(&mut PointerEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered when a pointer device is moved out of the hit test boundaries of an widget or one of its descendants.
sourcepub fn on_tap(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
pub fn on_tap(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when a tap(click) occurs.
sourcepub fn on_tap_capture(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
pub fn on_tap_capture(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a tap event. This is similar to on_tap
, but it’s triggered
earlier in the event flow. For more information on event capturing, see
Event capture.
sourcepub fn on_double_tap(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
pub fn on_double_tap(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when a double tap occurs.
sourcepub fn on_double_tap_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static
) -> Self
pub fn on_double_tap_capture( self, f: impl FnMut(&mut PointerEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a double tap event. This is similar to on_double_tap
, but it’s
triggered earlier in the event flow. For more information on event
capturing, see Event capture.
sourcepub fn on_triple_tap(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
pub fn on_triple_tap(self, f: impl FnMut(&mut PointerEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when a triple tap occurs.
sourcepub fn on_triple_tap_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static
) -> Self
pub fn on_triple_tap_capture( self, f: impl FnMut(&mut PointerEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered when a triple tap
occurs. This is similar to on_double_tap
, but it’s triggered earlier
in the event flow. For more information on event capturing, see
Event capture.
sourcepub fn on_x_times_tap(
self,
(times, f): (usize, impl FnMut(&mut PointerEvent) + 'static)
) -> Self
pub fn on_x_times_tap( self, (times, f): (usize, impl FnMut(&mut PointerEvent) + 'static) ) -> Self
Attaches a handler to the widget that is triggered when a x-times tap occurs.
sourcepub fn on_x_times_tap_capture(
self,
(times, f): (usize, impl FnMut(&mut PointerEvent) + 'static)
) -> Self
pub fn on_x_times_tap_capture( self, (times, f): (usize, impl FnMut(&mut PointerEvent) + 'static) ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a x-times tap event. This is similar to on_x_times_tap
, but
it’s triggered earlier in the event flow. For more information on event
capturing, see Event capture.
sourcepub fn on_wheel(self, f: impl FnMut(&mut WheelEvent) + 'static) -> Self
pub fn on_wheel(self, f: impl FnMut(&mut WheelEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when the user rotates a wheel button on a pointing device (typically a mouse).
sourcepub fn on_wheel_capture(self, f: impl FnMut(&mut WheelEvent) + 'static) -> Self
pub fn on_wheel_capture(self, f: impl FnMut(&mut WheelEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a wheel event. This is similar to on_wheel
, but it’s triggered
earlier in the event flow. For more information on event capturing, see
Event capture.
sourcepub fn on_ime_pre_edit(
self,
f: impl FnMut(&mut ImePreEditEvent) + 'static
) -> Self
pub fn on_ime_pre_edit( self, f: impl FnMut(&mut ImePreEditEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered when the input method pre-edit area is changed.
sourcepub fn on_ime_pre_edit_capture(
self,
f: impl FnMut(&mut ImePreEditEvent) + 'static
) -> Self
pub fn on_ime_pre_edit_capture( self, f: impl FnMut(&mut ImePreEditEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a ime pre-edit event. This is similar to on_ime_pre_edit
,
but it’s triggered earlier in the event flow. For more information on
event capturing, see Event capture.
sourcepub fn on_chars(self, f: impl FnMut(&mut CharsEvent) + 'static) -> Self
pub fn on_chars(self, f: impl FnMut(&mut CharsEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when the input method commits text or keyboard pressed the text key.
sourcepub fn on_chars_capture(self, f: impl FnMut(&mut CharsEvent) + 'static) -> Self
pub fn on_chars_capture(self, f: impl FnMut(&mut CharsEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a chars event. This is similar to on_chars
, but it’s triggered
earlier in the event flow. For more information on event capturing,
see Event capture.
sourcepub fn on_key_down(self, f: impl FnMut(&mut KeyboardEvent) + 'static) -> Self
pub fn on_key_down(self, f: impl FnMut(&mut KeyboardEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when the keyboard key is pressed.
sourcepub fn on_key_down_capture(
self,
f: impl FnMut(&mut KeyboardEvent) + 'static
) -> Self
pub fn on_key_down_capture( self, f: impl FnMut(&mut KeyboardEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a key down event. This is similar to on_key_down
, but it’s
triggered earlier in the event flow. For more information on event
capturing, see Event capture.
sourcepub fn on_key_up(self, f: impl FnMut(&mut KeyboardEvent) + 'static) -> Self
pub fn on_key_up(self, f: impl FnMut(&mut KeyboardEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when the keyboard key is released.
sourcepub fn on_key_up_capture(
self,
f: impl FnMut(&mut KeyboardEvent) + 'static
) -> Self
pub fn on_key_up_capture( self, f: impl FnMut(&mut KeyboardEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a key up event. This is similar to on_key_up
, but it’s
triggered earlier in the event flow. For more information on event
capturing, see Event capture.
sourcepub fn on_focus(self, f: impl FnMut(&mut FocusEvent) + 'static) -> Self
pub fn on_focus(self, f: impl FnMut(&mut FocusEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when the widget is focused.
sourcepub fn on_blur(self, f: impl FnMut(&mut FocusEvent) + 'static) -> Self
pub fn on_blur(self, f: impl FnMut(&mut FocusEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when the widget is lost focus.
sourcepub fn on_focus_in(self, f: impl FnMut(&mut FocusEvent) + 'static) -> Self
pub fn on_focus_in(self, f: impl FnMut(&mut FocusEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when the widget or its descendants are focused. The main difference between this event and focus is that focusin bubbles while focus does not.
sourcepub fn on_focus_in_capture(
self,
f: impl FnMut(&mut FocusEvent) + 'static
) -> Self
pub fn on_focus_in_capture( self, f: impl FnMut(&mut FocusEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a focus in event. This is similar to on_focus_in
, but it’s
triggered earlier in the event flow. For more information on event
capturing, see Event capture.
sourcepub fn on_focus_out(self, f: impl FnMut(&mut FocusEvent) + 'static) -> Self
pub fn on_focus_out(self, f: impl FnMut(&mut FocusEvent) + 'static) -> Self
Attaches a handler to the widget that is triggered when the widget or its descendants are lost focus. The main difference between this event and focusout is that focusout bubbles while blur does not.
sourcepub fn on_focus_out_capture(
self,
f: impl FnMut(&mut FocusEvent) + 'static
) -> Self
pub fn on_focus_out_capture( self, f: impl FnMut(&mut FocusEvent) + 'static ) -> Self
Attaches a handler to the widget that is triggered during the capture
phase of a focus out event. This is similar to on_focus_out
, but it’s
triggered earlier in the event flow. For more information on event
capturing, see Event capture.
sourcepub fn tab_index<V, M>(self, tab_idx: V) -> Self
pub fn tab_index<V, M>(self, tab_idx: V) -> Self
Initializes the widget with a tab index. The tab index is used to allow or prevent widgets from being sequentially focusable(usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. It accepts an integer as a value, with different results depending on the integer’s value:
- A negative value (usually -1) means that the widget is not reachable via sequential keyboard navigation, but could be focused with API or visually by clicking with the mouse.
- Zero means that the element should be focusable in sequential keyboard navigation, after any positive tab_index values and its order is defined by the tree’s source order.
- A positive value means the element should be focusable in sequential keyboard navigation, with its order defined by the value of the number. That is, tab_index=4 is focused before tab_index=5 and tab_index=0, but after tab_index=3. If multiple elements share the same positive tab_index value, their order relative to each other follows their position in the tree source. The maximum value for tab_index is 32767. If not specified, it takes the default value 0.
sourcepub fn auto_focus<V, M>(self, v: V) -> Self
pub fn auto_focus<V, M>(self, v: V) -> Self
Initializes whether the widget
should automatically get focus when the
window loads.
Only one widget should have this attribute specified. If there are several, the widget nearest the root, get the initial focus.
sourcepub fn box_fit<V, M>(self, v: V) -> Self
pub fn box_fit<V, M>(self, v: V) -> Self
Initializes how its child should be scale to fit its box.
sourcepub fn background<V, M>(self, v: V) -> Self
pub fn background<V, M>(self, v: V) -> Self
Initializes the background of the widget.
sourcepub fn border_radius<V, M>(self, v: V) -> Self
pub fn border_radius<V, M>(self, v: V) -> Self
Initializes the border radius of the widget.
sourcepub fn scrollable<V, M>(self, v: V) -> Self
pub fn scrollable<V, M>(self, v: V) -> Self
Initializes how user can scroll the widget.
sourcepub fn scroll_pos<V, M>(self, v: V) -> Self
pub fn scroll_pos<V, M>(self, v: V) -> Self
Initializes the position of the widget’s scroll.
sourcepub fn h_align<V, M>(self, v: V) -> Self
pub fn h_align<V, M>(self, v: V) -> Self
Initializes how the widget should be aligned horizontally.
sourcepub fn v_align<V, M>(self, v: V) -> Self
pub fn v_align<V, M>(self, v: V) -> Self
Initializes how the widget should be aligned vertically.
sourcepub fn anchor<V, M>(self, v: V) -> Self
pub fn anchor<V, M>(self, v: V) -> Self
Initializes the relative anchor to the parent of the widget.
sourcepub fn global_anchor<V, M>(self, v: V) -> Self
pub fn global_anchor<V, M>(self, v: V) -> Self
Initializes the global anchor of the widget.
sourcepub fn keep_alive<V, M>(self, v: V) -> Self
pub fn keep_alive<V, M>(self, v: V) -> Self
Initializes the keep_alive
value of the KeepAlive
widget.
Trait Implementations§
source§impl<T: ComposeBuilder> ComposeBuilder for FatObj<T>
impl<T: ComposeBuilder> ComposeBuilder for FatObj<T>
source§impl<T: ComposeChildBuilder> ComposeChildBuilder for FatObj<T>
impl<T: ComposeChildBuilder> ComposeChildBuilder for FatObj<T>
source§impl<T: ComposeWithChild<C, M>, C, M> ComposeWithChild<C, M> for FatObj<T>
impl<T: ComposeWithChild<C, M>, C, M> ComposeWithChild<C, M> for FatObj<T>
type Target = FatObj<<T as ComposeWithChild<C, M>>::Target>
fn with_child(self, child: C, ctx: &BuildCtx<'_>) -> Self::Target
source§impl<T1, T2, M> FromAnother<FatObj<T1>, [M; 0]> for FatObj<T2>where
T2: FromAnother<T1, M>,
impl<T1, T2, M> FromAnother<FatObj<T1>, [M; 0]> for FatObj<T2>where
T2: FromAnother<T1, M>,
fn from_another(value: FatObj<T1>, ctx: &BuildCtx<'_>) -> Self
source§impl<T1, T2, M> FromAnother<T1, [M; 1]> for FatObj<T2>where
T2: ChildFrom<T1, M>,
impl<T1, T2, M> FromAnother<T1, [M; 1]> for FatObj<T2>where
T2: ChildFrom<T1, M>,
fn from_another(value: T1, ctx: &BuildCtx<'_>) -> Self
source§impl<T> ObjDeclarer for FatObj<T>
impl<T> ObjDeclarer for FatObj<T>
source§impl<T: PairWithChild<C>, C> PairWithChild<C> for FatObj<T>
impl<T: PairWithChild<C>, C> PairWithChild<C> for FatObj<T>
source§impl<T: RenderBuilder> RenderBuilder for FatObj<T>
impl<T: RenderBuilder> RenderBuilder for FatObj<T>
source§impl<T: WidgetBuilder> WidgetBuilder for FatObj<T>
impl<T: WidgetBuilder> WidgetBuilder for FatObj<T>
source§impl WidgetBuilder for FatObj<Widget>
impl WidgetBuilder for FatObj<Widget>
impl<T: MultiChild> MultiChild for FatObj<T>
impl<T: SingleChild> SingleChild for FatObj<T>
Auto Trait Implementations§
impl<T> !Freeze for FatObj<T>
impl<T> !RefUnwindSafe for FatObj<T>
impl<T> !Send for FatObj<T>
impl<T> !Sync for FatObj<T>
impl<T> Unpin for FatObj<T>where
T: Unpin,
impl<T> !UnwindSafe for FatObj<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<C, T, M> ChildFrom<C, (M,)> for Twhere
T: FromAnother<C, M>,
impl<C, T, M> ChildFrom<C, (M,)> for Twhere
T: FromAnother<C, M>,
fn child_from(value: C, ctx: &BuildCtx<'_>) -> T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more