pub struct LintIssueDisplay {
pub level: Level,
pub scoped_name: String,
pub summary: Option<String>,
pub arrow_line: Option<String>,
pub message: String,
pub help_text: String,
pub custom_links: BTreeMap<String, String>,
}Expand description
A generic structure that represents all possible components of a lint issue display.
The actual layouting is done in the fmt::Display implementation of LintIssueDisplay.
§Visual Layout
level[scoped_name]: summary <- header with optional summary
--> arrow_line <- arrow line with context (optional)
|
| message <- main issue description
|
help: help_text line 1 <- help section
help_text line 2...
= custom_link: url <- custom links (optional)
= see: documentation_url <- auto-generated doc link§Examples
warning[source_info::duplicate_architecture]
--> in field 'arch' for package 'example'
|
| found duplicate value: x86_64
|
help: Architecture lists should be unique.
= see: https://alpm.archlinux.page/lints/...Fields§
§level: LevelThe lint level of the lint rule.
scoped_name: StringThe full name of the lint rule.
summary: Option<String>The optional summary of the lint rule.
arrow_line: Option<String>The optional information on where the issue occurs.
message: StringA message outlining what the specific issue is.
help_text: StringA help text outlining what can be done to fix the issue.
custom_links: BTreeMap<String, String>A map of additional URL names and URLs.
Trait Implementations§
Source§impl Clone for LintIssueDisplay
impl Clone for LintIssueDisplay
Source§fn clone(&self) -> LintIssueDisplay
fn clone(&self) -> LintIssueDisplay
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LintIssueDisplay
impl Debug for LintIssueDisplay
Source§impl Display for LintIssueDisplay
impl Display for LintIssueDisplay
Source§impl From<LintIssue> for LintIssueDisplay
impl From<LintIssue> for LintIssueDisplay
Source§fn from(other: LintIssue) -> LintIssueDisplay
fn from(other: LintIssue) -> LintIssueDisplay
Convert this LintIssue into a LintIssueDisplay for formatted output.
Auto Trait Implementations§
impl Freeze for LintIssueDisplay
impl RefUnwindSafe for LintIssueDisplay
impl Send for LintIssueDisplay
impl Sync for LintIssueDisplay
impl Unpin for LintIssueDisplay
impl UnwindSafe for LintIssueDisplay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more