pub trait WidgetWrapper {
    type Wrapped;

    // Required methods
    fn wrapped(&self) -> &Self::Wrapped;
    fn wrapped_mut(&mut self) -> &mut Self::Wrapped;
}
Expand description

A trait for widgets that wrap a single child to expose that child for access and mutation

Required Associated Types§

type Wrapped

The type of the wrapped widget. Maybe we would like to constrain this to Widget<impl Data> (if existential bounds were supported). Any other scheme leads to T being unconstrained in unification at some point

Required Methods§

fn wrapped(&self) -> &Self::Wrapped

Get immutable access to the wrapped child

fn wrapped_mut(&mut self) -> &mut Self::Wrapped

Get mutable access to the wrapped child

Implementors§

§

impl<SP, W> WidgetWrapper for Scope<SP, W>where SP: ScopePolicy, W: Widget<<SP as ScopePolicy>::State>,

§

type Wrapped = W

§

impl<T, U, L, W> WidgetWrapper for LensWrap<T, U, L, W>

§

type Wrapped = W

§

impl<T, W> WidgetWrapper for EnvScope<T, W>where W: Widget<T>,

§

type Wrapped = W

§

impl<T, W> WidgetWrapper for Padding<T, W>

§

type Wrapped = W

§

impl<W> WidgetWrapper for IdentityWrapper<W>

§

type Wrapped = W

§

impl<W, C> WidgetWrapper for ControllerHost<W, C>

§

type Wrapped = W