1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/// A macro to create a `MultiReaders` instance from a list of values.
///
/// # Examples
///
/// ```rust,ignore
/// // Using the macro with trait objects
/// wrap!(dyn MyTrait, val1, val2, val3);
///
/// // Using the macro with regular values
/// wrap!(val1, val2, val3);
/// ```
///
/// # Parameters
///
/// - `dyn $trait`: The trait that the values implement (optional).
/// - `$val`: The values to be wrapped in the `MultiReaders` instance.
///
/// # Usage
///
/// - When using the `dyn $trait` form, each value will be boxed and cast to a trait object.
/// - When using the form without `dyn $trait`, the values will be used as they are.
/// A macro to create a `MultiReaders` instance by opening multiple values asynchronously or synchronously.
///
/// # Examples
///
/// ```rust,ignore
/// // Using the macro with asynchronous opening
/// open!(async my_async_open, [val1, val2, val3]);
///
/// // Using the macro with synchronous opening
/// open!(my_open, [val1, val2, val3]);
/// ```
///
/// # Parameters
///
/// - `async $open`: The asynchronous open function (optional).
/// - `$open`: The synchronous open function.
/// - `$arg`: The arguments to be passed to the open function.
///
/// # Usage
///
/// - When using the `async $open` form, each value will be awaited and then wrapped in the `MultiReaders` instance.
/// - When using the form without `async $open`, the values will be opened synchronously and wrapped in the `MultiReaders` instance.