borderrs 0.1.1

Add stylish borders around your text and datastructures
Documentation
  • Coverage
  • 92.86%
    13 out of 14 items documented7 out of 10 items with examples
  • Size
  • Source code size: 29.77 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.93 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • funnyboy-roks

borderrs

Crates.io Documentation dependency status

This crate allows the user to format many data structures in ways that look nicer to the end-user.

The Wikipedia page on Box-Drawing Characters has been quite helpful

Currently, we support:

  • [slice]s with [BorderFormatter::format_slice]
  • [Iterator]s with [BorderFormatter::format_iter]
  • [HashMap]s with [BorderFormatter::format_hash_map]
  • impl [Display] with [BorderFormatter::format_display]
  • impl [Debug] with [BorderFormatter::format_debug]

Usage Example

use borderrs::{styles::THIN, BorderFormatter};

let slice = [0, 1, 2, 3, 4];
println!("{}", THIN.format_slice(&slice));

let mut map = HashMap::default();
map.insert("Jon", 38);
map.insert("Jake", 25);
map.insert("Josh", 17);
println!("{}", THIN.format_hash_map(&map));

println!("{}", THIN.format_display("hello"));
println!("{}", THIN.format_debug("hello"));