pub struct AuditIssue {
pub id: String,
pub file_path: PathBuf,
pub line_number: Option<usize>,
pub column_number: Option<usize>,
pub severity: IssueSeverity,
pub category: IssueCategory,
pub message: String,
pub suggestion: Option<String>,
pub context: Option<String>,
pub code_snippet: Option<String>,
pub related_issues: Vec<String>,
}Available on crate feature
doc-audit only.Expand description
A specific issue found during documentation audit.
Fields§
§id: StringUnique identifier for this issue
file_path: PathBufPath to the file containing the issue
line_number: Option<usize>Line number where the issue occurs (if applicable)
column_number: Option<usize>Column number where the issue occurs (if applicable)
severity: IssueSeveritySeverity level of the issue
category: IssueCategoryCategory of the issue
message: StringHuman-readable description of the issue
suggestion: Option<String>Suggested fix for the issue (if available)
context: Option<String>Additional context or details
code_snippet: Option<String>Code snippet showing the problematic area
Related issues (by ID)
Implementations§
Source§impl AuditIssue
impl AuditIssue
Sourcepub fn new(
file_path: PathBuf,
category: IssueCategory,
message: String,
) -> AuditIssue
pub fn new( file_path: PathBuf, category: IssueCategory, message: String, ) -> AuditIssue
Create a new audit issue with the given parameters.
Sourcepub fn with_line_number(self, line_number: usize) -> AuditIssue
pub fn with_line_number(self, line_number: usize) -> AuditIssue
Set the line number for this issue.
Sourcepub fn with_column_number(self, column_number: usize) -> AuditIssue
pub fn with_column_number(self, column_number: usize) -> AuditIssue
Set the column number for this issue.
Sourcepub fn with_severity(self, severity: IssueSeverity) -> AuditIssue
pub fn with_severity(self, severity: IssueSeverity) -> AuditIssue
Set the severity for this issue.
Sourcepub fn with_suggestion(self, suggestion: String) -> AuditIssue
pub fn with_suggestion(self, suggestion: String) -> AuditIssue
Set a suggestion for fixing this issue.
Sourcepub fn with_context(self, context: String) -> AuditIssue
pub fn with_context(self, context: String) -> AuditIssue
Set additional context for this issue.
Sourcepub fn with_code_snippet(self, code_snippet: String) -> AuditIssue
pub fn with_code_snippet(self, code_snippet: String) -> AuditIssue
Set a code snippet showing the problematic area.
Add a related issue ID.
Trait Implementations§
Source§impl Clone for AuditIssue
impl Clone for AuditIssue
Source§fn clone(&self) -> AuditIssue
fn clone(&self) -> AuditIssue
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 AuditIssue
impl Debug for AuditIssue
Source§impl<'de> Deserialize<'de> for AuditIssue
impl<'de> Deserialize<'de> for AuditIssue
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuditIssue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuditIssue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AuditIssue
impl Serialize for AuditIssue
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AuditIssue
impl RefUnwindSafe for AuditIssue
impl Send for AuditIssue
impl Sync for AuditIssue
impl Unpin for AuditIssue
impl UnwindSafe for AuditIssue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request