display_utils 0.4.0

Lightweight and no_std-compatible string formatting utilities
Documentation
  • Coverage
  • 100%
    41 out of 41 items documented17 out of 29 items with examples
  • Size
  • Source code size: 33.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.69 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • kangalio/display-utils
    39 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kangalio

This no_std compatible library provides several useful constructs to format data in a human-readable fashion with zero allocations.

Why hand-roll annoying and verbose formatting code everywhere...

for i, item in list.iter().enumerate() {
	if i == list.len() - 1 {
		println!("{}", item);
	} else {
		print!("{} - ", item);
	}
}

...when you could just use this?

println!("{}", display_utils::join(list, " - "));

This library makes ingenious use of Rust's formatting abstractions to provide super flexible and powerful formatting utilities, without any allocations.

For more information, please see the documentation: https://docs.rs/display_utils