size-of-trait-impl

Tiny little crate to determine how large an unnameable type is.

What does it look like?

```rust const C: usize = sizeoffuture!(f()); const D: usize = sizeoftraitimpl!(0u8, std::convert::Into); const E: usize = sizeoftrait_impl!((), for<'a> Foo<'a>);

fn main() { println!("{} {} {} {}", C, D, E, F); }

trait Foo<'a> {} impl<'a> Foo<'a> for () {} ```

You can add your own 'helper' macros which specialize to a specific trait, the same way size_of_future! works. Popular helpers may be upstreamed to this crate.

Why not use std::mem::size_of_val?

size_of_trait_impl! does not evaluate its arguments at all, and can be used in a const context.

MSRV

Currently, nightly is required (for feature(type_alias_impl_trait)).