Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ impl Renderer {
}

impl Renderer {
/// Render a diagnostic, a series of [`Group`]s
pub fn render(&self, groups: &[Group<'_>]) -> String {
if self.short_message {
self.render_short_message(groups).unwrap()
Expand Down
4 changes: 4 additions & 0 deletions src/snippet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ pub(crate) struct Id<'a> {
}

/// An [`Element`] container
///
/// A [diagnostic][crate::Renderer::render] is made of several `Group`s.
/// `Group`s are used to [annotate][AnnotationKind::Primary] [`Snippet`]s
/// with different [semantic reasons][Title].
#[derive(Clone, Debug)]
pub struct Group<'a> {
pub(crate) primary_level: Level<'a>,
Expand Down