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§

source

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§

source

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

Get immutable access to the wrapped child

source

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

Get mutable access to the wrapped child

Implementors§

source§

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

§

type Wrapped = W

source§

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

§

type Wrapped = W

source§

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

§

type Wrapped = W

source§

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

§

type Wrapped = W

source§

impl<W> WidgetWrapper for IdentityWrapper<W>

§

type Wrapped = W

source§

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

§

type Wrapped = W