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