Crate displaydoc_lite[][src]

Lite version of displaydoc.

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 that displaydoc-lite still has two proc-macro dependencies, but they are very tiny and do not have any dependencies.


use displaydoc_lite::displaydoc;
use std::io;

displaydoc! {
    pub enum DataStoreError {
        /// data store disconnected: {_0}
        /// the data for key `{_0}` is not available
        /// invalid header (expected {expected}, found {found})
        InvalidHeader {
            expected: String,
            found: String,
        /// unknown data store error

Support for interpolating fields is planed, but currently not implemented.


Licensed under either Apache License or the MIT license.



This macro is copied from the defile crate


The main macro of this crate which is used to create the Display implementation for an enum.