CTuple derives
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use core::fmt::{Debug, Formatter};
|
||||
|
||||
pub trait Tuple2CTuple {
|
||||
type CTuple;
|
||||
@@ -8,6 +9,7 @@ macro_rules! define_tuple {
|
||||
($struct_name:ident, $module_name:ident, $($T:ident),*) => {
|
||||
pub mod $module_name {
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct $struct_name<$($T),*>($(pub $T),*);
|
||||
|
||||
impl<$($T),*> super::Tuple2CTuple for ($($T,)*) {
|
||||
|
||||
Reference in New Issue
Block a user