abuse macros..
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::{HasUi, WidgetIdFn, WidgetLike, WidgetRef};
|
||||
use crate::{HasUi, StateLike, WidgetIdFn, WidgetLike, WidgetRef};
|
||||
|
||||
pub trait WidgetAttr<State, W: ?Sized> {
|
||||
type Input;
|
||||
@@ -9,7 +9,9 @@ pub trait Attrable<State, W: ?Sized, Tag> {
|
||||
fn attr<A: WidgetAttr<State, W>>(self, input: A::Input) -> impl WidgetIdFn<State, W>;
|
||||
}
|
||||
|
||||
impl<State: HasUi, WL: WidgetLike<State, Tag>, Tag> Attrable<State, WL::Widget, Tag> for WL {
|
||||
impl<State: HasUi + StateLike<State>, WL: WidgetLike<State, Tag>, Tag>
|
||||
Attrable<State, WL::Widget, Tag> for WL
|
||||
{
|
||||
fn attr<A: WidgetAttr<State, WL::Widget>>(
|
||||
self,
|
||||
input: A::Input,
|
||||
|
||||
Reference in New Issue
Block a user