displaydoc-lite
Implement the Display
trait using your standard doc comments.
This crate is a lite version of the popular crate displaydoc
.
It provides the same functionality but using a declarative macro instead
and not depending on syn
or quote
.
This crate is also usable in no_std
environments. No additional features are required for that.
Note: displaydoc-lite
still has a proc-macro as a dependency,
but it's very tiny and doesn't have any dependencies.
Example
use displaydoc;
displaydoc!
Details
Listing of all supported syntax variants inside a {}
:
{var}
->write!("{}", self.var)
{_0}
->write!("{}", self.0)
{var:?}
->write!("{:?}", self.var)
{_0:?}
->write!("{:?}", self.0)
License
Licensed under either Apache License or the MIT license.