Crates.io | printable |
lib.rs | printable |
version | 2.2.0 |
source | src |
created_at | 2023-01-10 16:41:43.352283 |
updated_at | 2024-05-21 11:42:45.384798 |
description | Provides `std::fmt::Display` wrapper for iterators and tuples. |
homepage | https://github.com/andrewsonin/printable |
repository | https://github.com/andrewsonin/printable |
max_upload_size | |
id | 755633 |
size | 28,084 |
Provides std::fmt::Display
wrapper for iterators and tuples.
Displaying iterators.
use printable::prelude::PrintableIter;
let v = vec![1, 2, 3];
assert_eq!(format!("{}", v.iter().printable()), "[1, 2, 3]");
Displaying tuples.
use printable::prelude::PrintableTuple;
let v = (1, "2", 3.0);
assert_eq!(format!("{}", v.printable()), "[1, 2, 3]");
unstable-assert-no-drop
Enables compile-time assertions that the iterators used don't own any resource.
May violate backward compatibility and lead to compilation failure even if the major semver versions of the underlying crates aren't updated.
This may happen due to the following factors:
std::mem::needs_drop
documentation does not guarantee its
stability.