| 14 | } |
| 15 | |
| 16 | trait MyMod: View + Sized { |
| 17 | fn my_modifier(self) -> impl View { |
| 18 | state(MyState::default, move |s, cx| { |
| 19 | self.clone() |
| 20 | .offset(LocalOffset::new(0.0, cx[s].offset)) |
| 21 | .anim(move |cx, _| { |
| 22 | cx[s].offset *= 0.9; |
| 23 | }) |
| 24 | }) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | impl<V: View> MyMod for V {} |
| 29 |
no outgoing calls
no test coverage detected