cushy::widget

Trait MountableChild

source
pub trait MountableChild: Sized {
    // Required methods
    fn mount(
        widget: MountedWidget,
        into: &MountedChildren<Self>,
        index: usize,
    ) -> Self;
    fn unmount(self) -> MountedWidget;
    fn widget(&self) -> &MountedWidget;
}
Expand description

A child in a MountedChildren collection.

Required Methods§

source

fn mount( widget: MountedWidget, into: &MountedChildren<Self>, index: usize, ) -> Self

Returns the mounted representation of widget.

source

fn unmount(self) -> MountedWidget

Returns the widget and performs any other cleanup for this widget being unmounted.q

source

fn widget(&self) -> &MountedWidget

Returns a reference to the widget.

Object Safety§

This trait is not object safe.

Implementors§