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>

source

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).

source

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).

source

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).

source

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>

source

pub fn new(host: T) -> Self

Create a new FatObj with the given host object.

source

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.

source

pub fn is_empty(&self) -> bool

Return true if the FatObj not contains any builtin widgets.

source

pub fn into_inner(self) -> T

Return the host object of the FatObj.

§Panics

Panics if the FatObj contains builtin widgets.

source

pub fn lazy_host_id(&self) -> LazyWidgetId

Return the LazyWidgetId of the host widget, through which you can access the WidgetId after building.

source

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>

source

pub fn get_mix_builtin_widget(&mut self) -> &mut State<MixBuiltin>

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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>

source

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.

source

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.

source

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.

source

pub fn on_disposed(self, f: impl FnOnce(&mut LifecycleEvent) + 'static) -> Self

Attaches an event handler that runs when the widget is disposed.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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).

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

pub fn tab_index<V, M>(self, tab_idx: V) -> Self
where DeclareInit<i16>: DeclareFrom<V, M>,

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.
source

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.

source

pub fn box_fit<V, M>(self, v: V) -> Self

Initializes how its child should be scale to fit its box.

source

pub fn background<V, M>(self, v: V) -> Self

Initializes the background of the widget.

source

pub fn border<V, M>(self, v: V) -> Self

Initializes the border of the widget.

source

pub fn border_radius<V, M>(self, v: V) -> Self

Initializes the border radius of the widget.

source

pub fn padding<V, M>(self, v: V) -> Self

Initializes the extra space within the widget.

source

pub fn cursor<V, M>(self, v: V) -> Self

Initializes the cursor of the widget.

source

pub fn margin<V, M>(self, v: V) -> Self

Initializes the space around the widget.

source

pub fn scrollable<V, M>(self, v: V) -> Self

Initializes how user can scroll the widget.

source

pub fn scroll_pos<V, M>(self, v: V) -> Self

Initializes the position of the widget’s scroll.

source

pub fn transform<V, M>(self, v: V) -> Self

Initializes the transformation of the widget.

source

pub fn h_align<V, M>(self, v: V) -> Self

Initializes how the widget should be aligned horizontally.

source

pub fn v_align<V, M>(self, v: V) -> Self

Initializes how the widget should be aligned vertically.

source

pub fn anchor<V, M>(self, v: V) -> Self

Initializes the relative anchor to the parent of the widget.

source

pub fn global_anchor<V, M>(self, v: V) -> Self

Initializes the global anchor of the widget.

source

pub fn visible<V, M>(self, v: V) -> Self

Initializes the visibility of the widget.

source

pub fn opacity<V, M>(self, v: V) -> Self
where DeclareInit<f32>: DeclareFrom<V, M>,

Initializes the opacity of the widget.

source

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>

source§

fn build(self, ctx: &BuildCtx<'_>) -> Widget

source§

impl<T: ComposeChildBuilder> ComposeChildBuilder for FatObj<T>

source§

fn build(self, ctx: &BuildCtx<'_>) -> Widget

source§

impl<T: ComposeWithChild<C, M>, C, M> ComposeWithChild<C, M> for FatObj<T>

§

type Target = FatObj<<T as ComposeWithChild<C, M>>::Target>

source§

fn with_child(self, child: C, ctx: &BuildCtx<'_>) -> Self::Target

source§

impl<T> DerefMut for FatObj<T>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<T1, T2, M> FromAnother<FatObj<T1>, [M; 0]> for FatObj<T2>
where T2: FromAnother<T1, M>,

source§

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>,

source§

fn from_another(value: T1, ctx: &BuildCtx<'_>) -> Self

source§

impl<T> ObjDeclarer for FatObj<T>

§

type Target = FatObj<T>

source§

fn finish(self, _: &BuildCtx<'_>) -> Self::Target

Finish the object creation with the given context.
source§

impl<T: PairWithChild<C>, C> PairWithChild<C> for FatObj<T>

§

type Target = Pair<FatObj<T>, C>

source§

fn with_child(self, child: C, _: &BuildCtx<'_>) -> Self::Target

source§

impl<T: RenderBuilder> RenderBuilder for FatObj<T>

source§

fn build(self, ctx: &BuildCtx<'_>) -> Widget

source§

impl<C> SingleWithChild<C, ()> for FatObj<()>

§

type Target = FatObj<C>

source§

fn with_child(self, child: C, _: &BuildCtx<'_>) -> Self::Target

source§

impl<T: WidgetBuilder> WidgetBuilder for FatObj<T>

source§

fn build(self, ctx: &BuildCtx<'_>) -> Widget

source§

fn box_it(self) -> BoxedWidget
where Self: Sized + 'static,

Convert the widget to named type widget FnWidget, this is useful when you want store a widget and not want to call build(ctx!()) to build it into the widget tree. Read more
source§

impl WidgetBuilder for FatObj<Widget>

source§

fn build(self, ctx: &BuildCtx<'_>) -> Widget

source§

fn box_it(self) -> BoxedWidget
where Self: Sized + 'static,

Convert the widget to named type widget FnWidget, this is useful when you want store a widget and not want to call build(ctx!()) to build it into the widget tree. Read more
source§

impl<T> Deref for FatObj<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<T: MultiChild> MultiChild for FatObj<T>

source§

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> 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<C, T, M> ChildFrom<C, (M,)> for T
where T: FromAnother<C, M>,

source§

fn child_from(value: C, ctx: &BuildCtx<'_>) -> T

source§

impl<T> ChildFrom<T, ()> for T

source§

fn child_from(value: T, _: &BuildCtx<'_>) -> T

source§

impl<T> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<M, P, C> MultiWithChild<C, M> for P
where P: MultiParent, C: FillVec<M>, M: ?Sized,

§

type Target = MultiPair<P>

source§

fn with_child( self, child: C, ctx: &BuildCtx<'_> ) -> <P as MultiWithChild<C, M>>::Target

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<P, C> SingleWithChild<C, dyn ComposeBuilder> for P
where P: SingleParent, C: ComposeBuilder,

§

type Target = Widget

source§

fn with_child( self, child: C, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<C, dyn ComposeBuilder>>::Target

source§

impl<P, C> SingleWithChild<C, dyn ComposeChildBuilder> for P
where P: SingleParent, C: ComposeChildBuilder,

§

type Target = Widget

source§

fn with_child( self, child: C, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<C, dyn ComposeChildBuilder>>::Target

source§

impl<P, C> SingleWithChild<C, dyn RenderBuilder> for P
where P: SingleParent, C: RenderBuilder,

§

type Target = Widget

source§

fn with_child( self, child: C, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<C, dyn RenderBuilder>>::Target

source§

impl<P, C> SingleWithChild<C, dyn SelfBuilder> for P
where P: SingleParent, C: SelfBuilder,

§

type Target = Widget

source§

fn with_child( self, child: C, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<C, dyn SelfBuilder>>::Target

source§

impl<P, C> SingleWithChild<C, dyn WidgetBuilder> for P
where P: SingleParent, C: WidgetBuilder,

§

type Target = Widget

source§

fn with_child( self, child: C, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<C, dyn WidgetBuilder>>::Target

source§

impl<P, C> SingleWithChild<Option<C>, dyn ComposeBuilder> for P
where P: SingleParent + RenderBuilder, C: ComposeBuilder,

§

type Target = Widget

source§

fn with_child( self, child: Option<C>, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<Option<C>, dyn ComposeBuilder>>::Target

source§

impl<P, C> SingleWithChild<Option<C>, dyn ComposeChildBuilder> for P
where P: SingleParent + RenderBuilder, C: ComposeChildBuilder,

§

type Target = Widget

source§

fn with_child( self, child: Option<C>, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<Option<C>, dyn ComposeChildBuilder>>::Target

source§

impl<P, C> SingleWithChild<Option<C>, dyn RenderBuilder> for P
where P: SingleParent + RenderBuilder, C: RenderBuilder,

§

type Target = Widget

source§

fn with_child( self, child: Option<C>, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<Option<C>, dyn RenderBuilder>>::Target

source§

impl<P, C> SingleWithChild<Option<C>, dyn SelfBuilder> for P
where P: SingleParent + RenderBuilder, C: SelfBuilder,

§

type Target = Widget

source§

fn with_child( self, child: Option<C>, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<Option<C>, dyn SelfBuilder>>::Target

source§

impl<P, C> SingleWithChild<Option<C>, dyn WidgetBuilder> for P
where P: SingleParent + RenderBuilder, C: WidgetBuilder,

§

type Target = Widget

source§

fn with_child( self, child: Option<C>, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<Option<C>, dyn WidgetBuilder>>::Target

source§

impl<P, V, PP> SingleWithChild<PP, &dyn ComposeBuilder> for P
where P: SingleParent, PP: InnerPipe<Value = Option<V>>, V: ComposeBuilder + 'static,

§

type Target = Widget

source§

fn with_child( self, child: PP, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<PP, &dyn ComposeBuilder>>::Target

source§

impl<P, V, PP> SingleWithChild<PP, &dyn ComposeChildBuilder> for P
where P: SingleParent, PP: InnerPipe<Value = Option<V>>, V: ComposeChildBuilder + 'static,

§

type Target = Widget

source§

fn with_child( self, child: PP, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<PP, &dyn ComposeChildBuilder>>::Target

source§

impl<P, V, PP> SingleWithChild<PP, &dyn RenderBuilder> for P
where P: SingleParent, PP: InnerPipe<Value = Option<V>>, V: RenderBuilder + 'static,

§

type Target = Widget

source§

fn with_child( self, child: PP, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<PP, &dyn RenderBuilder>>::Target

source§

impl<P, V, PP> SingleWithChild<PP, &dyn SelfBuilder> for P
where P: SingleParent, PP: InnerPipe<Value = Option<V>>, V: SelfBuilder + 'static,

§

type Target = Widget

source§

fn with_child( self, child: PP, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<PP, &dyn SelfBuilder>>::Target

source§

impl<P, V, PP> SingleWithChild<PP, &dyn WidgetBuilder> for P
where P: SingleParent, PP: InnerPipe<Value = Option<V>>, V: WidgetBuilder + 'static,

§

type Target = Widget

source§

fn with_child( self, child: PP, ctx: &BuildCtx<'_> ) -> <P as SingleWithChild<PP, &dyn WidgetBuilder>>::Target

source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more