Struct mit_lint::Problem [−][src]
pub struct Problem { /* fields omitted */ }Expand description
Information about the breaking of the lint
Implementations
Create a new problem
Examples
use mit_lint::{Code, Problem};
let problem = Problem::new(
"Error title".to_string(),
"Some advice on how to fix it".to_string(),
Code::BodyWiderThan72Characters,
);
assert_eq!(problem.error(), "Error title".to_string())Get the code for this problem
Examples
use mit_lint::{Code, Problem};
let problem = Problem::new(
"Error title".to_string(),
"Some advice on how to fix it".to_string(),
Code::BodyWiderThan72Characters,
);
assert_eq!(problem.code(), &Code::BodyWiderThan72Characters)Get the descriptive title for this error
Examples
use mit_lint::{Code, Problem};
let problem = Problem::new(
"Error title".to_string(),
"Some advice on how to fix it".to_string(),
Code::BodyWiderThan72Characters,
);
assert_eq!(problem.error(), "Error title".to_string())Get advice on how to fix the problem
This should be a description of why this is a problem, and how to fix it
Examples
use mit_lint::{Code, Problem};
let problem = Problem::new(
"Error title".to_string(),
"Some advice on how to fix it".to_string(),
Code::BodyWiderThan72Characters,
);
assert_eq!(problem.tip(), "Some advice on how to fix it".to_string())Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Problem
impl UnwindSafe for Problem
Blanket Implementations
Mutably borrows from an owned value. Read more