macro_rules! to_owned { ($es:ident $(, $($rest:tt)*)?) => { ... }; ($($deref:ident).* $(, $($rest:tt)*)?) => { ... }; ($($deref:ident)* @ $head:ident $( . $tail:ident)+ $(, $($rest:tt)*)?) => { ... }; ($($deref:ident)* @ $last:ident $(, $($rest:tt)*)? ) => { ... }; }
Expand description
A helper macro for cloning multiple values at once
§Usage
let (data) = use_signal(|| {});
let handle_thing = move |_| {
to_owned![data, props.prop];
spawn(async move {
// do stuff
});
};