pub struct FindingSpec {
pub id: String,
pub message: String,
pub level: Option<FindingLevel>,
pub pos: Option<SourcePos>,
pub hint: Option<String>,
}Expand description
The input to Ctx::finding — id and message required, level/pos/hint optional.
Fields§
§id: Stringthe finding id, area/.../name
message: Stringwhat is wrong, in a sentence
level: Option<FindingLevel>overrides the registry’s default level for the id
pos: Option<SourcePos>where in the document, if anywhere
hint: Option<String>the nearest description: in scope
Implementations§
Source§impl FindingSpec
impl FindingSpec
Sourcepub fn new(id: impl Into<String>, message: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, message: impl Into<String>) -> Self
A spec with an id and a message, and no level, position or hint.
Sourcepub fn level(self, level: FindingLevel) -> Self
pub fn level(self, level: FindingLevel) -> Self
Override the registry default level.
Trait Implementations§
Source§impl Clone for FindingSpec
impl Clone for FindingSpec
Auto Trait Implementations§
impl Freeze for FindingSpec
impl RefUnwindSafe for FindingSpec
impl Send for FindingSpec
impl Sync for FindingSpec
impl Unpin for FindingSpec
impl UnsafeUnpin for FindingSpec
impl UnwindSafe for FindingSpec
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