MCPcopy Create free account
hub / github.com/audulus/rui / MyMod

Interface MyMod

examples/custom_modifier_with_state.rs:16–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16trait 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
28impl<V: View> MyMod for V {}
29

Callers 1

mainFunction · 0.45

Implementers 1

custom_modifier_with_state.rsexamples/custom_modifier_with_state.rs

Calls

no outgoing calls

Tested by

no test coverage detected