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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§