#notation #mem #macro #turbofish #no-std #size-of #align-of

deprecated no-std mem_macros

align_of and size_of as a macro, to avoid turbofish notation

5 releases (2 stable)

Uses old Rust 2015

1.0.1 Jan 27, 2022
1.0.0 Jun 5, 2018
0.1.2 Jun 5, 2018
0.1.1 Jun 4, 2018
0.1.0 May 23, 2018

#34 in #mem

Download history 12/week @ 2024-11-13 11/week @ 2024-11-20 16/week @ 2024-11-27 24/week @ 2024-12-04 25/week @ 2024-12-11 11/week @ 2024-12-18 4/week @ 2025-01-01 1/week @ 2025-01-08 48/week @ 2025-01-15 8/week @ 2025-01-22 5/week @ 2025-01-29 15/week @ 2025-02-05 35/week @ 2025-02-12 24/week @ 2025-02-19 19/week @ 2025-02-26

94 downloads per month
Used in 4 crates (via razy-importer)

MIT/Apache

8KB

mem_macros

std::mem::size_of and std::mem::align_of as a macro, to avoid turbofish notation.

Examples

#[macro_use]
extern crate mem_macros;
assert_eq!(1, size_of!(u8));

lib.rs:

align_of and size_of as a macro, to avoid turbofish notation

No runtime deps