Refine packages plumbing.

This commit is contained in:
Stephen Chung
2020-04-21 23:01:10 +08:00
parent e394824bf3
commit 0a75479637
19 changed files with 1232 additions and 1406 deletions

View File

@@ -5,15 +5,15 @@
use crate::any::{Dynamic, Variant};
use crate::stdlib::vec::Vec;
/// Trait that represent arguments to a function call.
/// Any data type that can be converted into a `Vec` of `Dynamic` values can be used
/// Trait that represents arguments to a function call.
/// Any data type that can be converted into a `Vec<Dynamic>` can be used
/// as arguments to a function call.
pub trait FuncArgs {
/// Convert to a `Vec` of `Dynamic` arguments.
/// Convert to a `Vec<Dynamic>` of the function call arguments.
fn into_vec(self) -> Vec<Dynamic>;
}
// Macro to implement `FuncArgs` for tuples of standard types (each can be
/// Macro to implement `FuncArgs` for tuples of standard types (each can be
/// converted into `Dynamic`).
macro_rules! impl_args {
($($p:ident),*) => {