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
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_mut(&mut self) -> &mut Self::Wrapped
fn wrapped_mut(&mut self) -> &mut Self::Wrapped
Get mutable access to the wrapped child