mem_println

Crates.iomem_println
lib.rsmem_println
version0.1.5
sourcesrc
created_at2022-06-24 23:08:15.397674
updated_at2022-06-28 17:42:31.811161
descriptionShortcuts for debugging the size of value in bytes
homepage
repositoryhttps://github.com/emirtemindarov/mem.git
max_upload_size
id612679
size4,278
Эмир Теминдаров (emirtemindarov)

documentation

https://docs.rs/mem_println/0.1.5

README

This crate provides macro shorthand for displaying size of given value in bytes. This can be handy when you want to write less code for debugging to determine how much space is allocated for a variable.

Example:

#[macro_use]
extern crate mem_println;
use mem_println::mem;

fn foo() {
    let value: i32 = 10;
    mem!(value);      // println!("{}", mem::size_of_val(&value));
}
Commit count: 1

cargo fmt