We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb0d16d commit c74a346Copy full SHA for c74a346
src/level.rs
@@ -91,6 +91,20 @@ impl<'a> Level<'a> {
91
/// used to normalize untrusted text before it is passed to this function.
92
///
93
/// </div>
94
+ ///
95
+ /// # Example
96
97
+ /// ```rust
98
+ /// # use annotate_snippets::{Group, Snippet, AnnotationKind, Level};
99
+ /// let input = &[
100
+ /// Group::with_title(Level::ERROR.title("mismatched types").id("E0308"))
101
+ /// .element(
102
+ /// Level::NOTE
103
+ /// .no_name()
104
+ /// .message("expected reference `&str`\nfound reference `&'static [u8; 0]`"),
105
+ /// ),
106
+ /// ];
107
+ /// ```
108
pub fn message(self, text: impl Into<Cow<'a, str>>) -> Message<'a> {
109
Message {
110
level: self,
0 commit comments