1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// SPDX-License-Identifier: Apache-2.0
//! [](https://crates.io/crates/doxed)
//! 
//! 
//! 
//!
//! **Doxed** is a crate for making Rust doc strings available at runtime.
//!
//! This crate provides a trait, `Doxed`, which can be derived for any type to
//! make its doc strings available at runtime. The doc string is specified
//! using the `#[doc = "..."]` attribute or, more commonly, the Rust doc
//! comment (`///`).
//!
//! Note that when deriving `Doxed`, the doc string is not modified in any way.
//! This preserves the original formatting, including leading whitespace and
//! line breaks. If you want to do any processing on the doc string, you can
//! easily do so at runtime without additional derive magic.
//!
//! # Example
//!
//! ```rust
//! use doxed::Doxed;
//!
//! /// This is an example struct.
//! ///
//! /// Multiple lines are supported.
//! #[doc = "So are manual doc attributes."]
//! #[derive(Doxed)]
//! struct Example<'a, T>(&'a T);
//!
//! assert_eq!(Example::<()>::DOX, &[
//! " This is an example struct.",
//! "",
//! " Multiple lines are supported.",
//! "So are manual doc attributes."
//! ]);
//! ```
pub use Doxed;
/// A trait for types that have a doc string.