mem_println 0.1.5

Shortcuts for debugging the size of value in bytes
Documentation
  • Coverage
  • 66.67%
    2 out of 3 items documented0 out of 0 items with examples
  • Size
  • Source code size: 3.92 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.01 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • emirtemindarov/mem
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • emirtemindarov

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));
}