#![allow(unused_macros)]
#![allow(unused_unsafe)]
#![allow(non_camel_case_types)]
use anyhow::Result;
use approx;
use base64;
use cpal;
use criterion;
use kd_tree;
use nalgebra::DMatrix;
use num_complex;
use num_traits;
use paste;
use proc_macro2;
use quote;
use syn;
use rand::{self, Rng};
use rand_distr;
use realfft;
use rstats;
use serde::{Deserialize, Serialize};
use tokio;
pub mod traits {
use std::marker::PhantomData;
use std::mem::size_of;
use std::ops::Deref;
pub struct AsEnum<T>(PhantomData<T>);
pub struct DecomposeArray<T> {
_marker: PhantomData<T>,
}
pub trait DecomposeArrayTrait {
type type_;
fn value() -> u32;
}
impl<T> DecomposeArrayTrait for DecomposeArray<T> {
type type_ = T;
fn value() -> u32 {
size_of::<T>() as u32 / size_of::<Self::type_>() as u32
}
}
pub struct POD<PointT> {
_marker: PhantomData<PointT>,
}
impl<PointT> POD<PointT> {
pub fn type_() -> PointT {
unimplemented!()
}
}
pub struct Name<PointT, Tag, Dummy = i32> {
_marker: PhantomData<(PointT, Tag, Dummy)>,
}
impl<PointT, Tag, Dummy> Name<PointT, Tag, Dummy> {
pub fn value() -> &'static str {
unimplemented!()
}
}
pub struct Offset<PointT, Tag> {
_marker: PhantomData<(PointT, Tag)>,
}
impl<PointT, Tag> Offset<PointT, Tag> {
pub fn value() -> usize {
unimplemented!()
}
}
pub struct DataType<PointT, Tag> {
_marker: PhantomData<(PointT, Tag)>,
}
impl<PointT, Tag> DataType<PointT, Tag> {
pub fn type_() -> Box<dyn Deref<Target = ()>> {
unimplemented!()
}
pub fn value() -> u8 {
unimplemented!()
}
pub fn size() -> u32 {
unimplemented!()
}
}
pub struct FieldList<PointT> {
_marker: PhantomData<PointT>,
}
impl<PointT> FieldList<PointT> {
pub fn type_() -> Vec<Box<dyn Deref<Target = ()>>> {
unimplemented!()
}
}
}
#[cfg(test)]
mod tests1 {
use super::*;
#[test]
fn test_decompose_array() {
let value = <traits::DecomposeArray<[f32; 4]> as traits::DecomposeArrayTrait>::value();
assert_eq!(value, 4);
}
#[test]
fn test_pod() {
let _pod_type = traits::POD::<f32>::type_();
}
#[test]
fn test_name() {
let name = traits::Name::<f32, ()>::value();
assert_eq!(name, "");
}
#[test]
fn test_offset() {
let offset = traits::Offset::<f32, ()>::value();
assert_eq!(offset, 0);
}
#[test]
fn test_data_type() {
let data_type = traits::DataType::<f32, ()>::type_();
assert_eq!(data_type.deref(), &());
}
#[test]
fn test_field_list() {
let field_list = traits::FieldList::<f32>::type_();
assert_eq!(field_list.len(), 0);
}
}