pub struct Issue {
pub level: IssueLevel,
pub code: String,
pub message: String,
pub file: Option<String>,
pub line: Option<usize>,
pub column: Option<usize>,
pub suggestion: Option<String>,
pub context: Option<String>,
}Expand description
A single validation issue
Fields§
§level: IssueLevelSeverity level
code: StringIssue code (e.g., “tailwind-invalid-class”)
message: StringHuman-readable message
file: Option<String>File path
line: Option<usize>Line number (0-indexed)
column: Option<usize>Column number (0-indexed)
suggestion: Option<String>Suggested fix
context: Option<String>Additional context
Implementations§
Source§impl Issue
impl Issue
Sourcepub fn new(
level: IssueLevel,
code: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn new( level: IssueLevel, code: impl Into<String>, message: impl Into<String>, ) -> Self
Create a new issue
Sourcepub fn with_column(self, column: usize) -> Self
pub fn with_column(self, column: usize) -> Self
Add column location
Sourcepub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
Add suggestion
Sourcepub fn with_context(self, context: impl Into<String>) -> Self
pub fn with_context(self, context: impl Into<String>) -> Self
Add context
Sourcepub fn error(code: impl Into<String>, message: impl Into<String>) -> Self
pub fn error(code: impl Into<String>, message: impl Into<String>) -> Self
Create an error issue
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Issue
impl<'de> Deserialize<'de> for Issue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Issue
impl RefUnwindSafe for Issue
impl Send for Issue
impl Sync for Issue
impl Unpin for Issue
impl UnsafeUnpin for Issue
impl UnwindSafe for Issue
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