Allow canvas::State to produce messages
This commit is contained in:
parent
2ca73036ab
commit
e4eb0553de
4 changed files with 31 additions and 17 deletions
|
|
@ -80,7 +80,10 @@ impl Cache {
|
|||
Geometry::from_primitive(Primitive::Cached { cache: primitive })
|
||||
}
|
||||
|
||||
pub fn with<'a, T>(&'a self, input: T) -> impl crate::canvas::State + 'a
|
||||
pub fn with<'a, T, Message>(
|
||||
&'a self,
|
||||
input: T,
|
||||
) -> impl crate::canvas::State<Message> + 'a
|
||||
where
|
||||
T: Drawable + std::fmt::Debug + 'a,
|
||||
{
|
||||
|
|
@ -93,7 +96,7 @@ struct Bind<'a, T> {
|
|||
input: T,
|
||||
}
|
||||
|
||||
impl<'a, T> crate::canvas::State for Bind<'a, T>
|
||||
impl<'a, T, Message> crate::canvas::State<Message> for Bind<'a, T>
|
||||
where
|
||||
T: Drawable + std::fmt::Debug + 'a,
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue