macro_rules! wrap {
(dyn $trait:path, $($val:expr), +) => { ... };
($($val:expr), +) => { ... };
}Expand description
A macro to create a MultiReaders instance from a list of values.
§Examples
ⓘ
// 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 theMultiReadersinstance.
§Usage
- When using the
dyn $traitform, 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.