Macro abi_stable::rtuple
source · macro_rules! rtuple { () => { ... }; ($v0:expr $(,)* ) => { ... }; ($v0:expr,$v1:expr $(,)* ) => { ... }; ($v0:expr,$v1:expr,$v2:expr $(,)* ) => { ... }; ($v0:expr,$v1:expr,$v2:expr,$v3:expr $(,)* ) => { ... }; }
Expand description
Use this macro to construct a abi_stable::std_types::Tuple*
with the values passed to the macro.
§Example
use abi_stable::{
rtuple,
std_types::{Tuple1, Tuple2, Tuple3, Tuple4},
};
assert_eq!(rtuple!(), ());
assert_eq!(rtuple!(3), Tuple1(3));
assert_eq!(rtuple!(3, 5), Tuple2(3, 5));
assert_eq!(rtuple!(3, 5, 8), Tuple3(3, 5, 8));
assert_eq!(rtuple!(3, 5, 8, 9), Tuple4(3, 5, 8, 9));