typelayout 0.1.0

type-level layout reflection
Documentation
//! Type-level layout information.
//! ## Example
//! ```rust
//! use typelayout::{ReprC, Generic, Layout};
//!
//! #[derive(Generic)]
//! #[repr(C)]
//! pub struct Struct {
//!   first: u8,
//!   second: u32,
//! }
//!
//! unsafe impl ReprC for Struct {}
//!
//! assert_eq!(4, <Struct as Layout>::ALIGN);
//! assert_eq!(8, <Struct as Layout>::SIZE);
//! ```
pub extern crate typenum;
pub extern crate frunk;
extern crate frunk_core;

mod align;
use crate::align::*;

mod data;

mod layout;
pub use crate::layout::Layout;

mod packing;
use crate::packing::*;

mod padding;
pub use padding::NoPadding;

mod size;
use crate::size::*;

pub use frunk::Generic;

mod fromzeros;
pub use fromzeros::FromZeros;

/// A marker trait for types that are ReprC
pub unsafe trait ReprC {}