Change call_fn_raw to call_fn_with_options.

This commit is contained in:
Stephen Chung
2022-11-21 23:42:29 +08:00
parent 3feff3618a
commit d151c87687
18 changed files with 387 additions and 233 deletions

View File

@@ -66,6 +66,13 @@ impl<T: Variant + Clone> FuncArgs for Vec<T> {
}
}
impl<T: Variant + Clone, const N: usize> FuncArgs for [T; N] {
#[inline]
fn parse<ARGS: Extend<Dynamic>>(self, args: &mut ARGS) {
args.extend(IntoIterator::into_iter(self).map(Dynamic::from));
}
}
/// Macro to implement [`FuncArgs`] for tuples of standard types (each can be converted into a [`Dynamic`]).
macro_rules! impl_args {
($($p:ident),*) => {