pub struct ConversionWarning {
pub severity: WarningSeverity,
pub category: WarningCategory,
pub file: PathBuf,
pub line: Option<usize>,
pub pattern: String,
pub message: String,
pub suggestion: Option<String>,
pub doc_link: Option<String>,
}Expand description
Rich warning with context and alternatives
Fields§
§severity: WarningSeverityWarning severity
category: WarningCategoryWarning category
file: PathBufFile where the warning occurred
line: Option<usize>Line number (if applicable)
pattern: StringThe Helm pattern that triggered the warning
message: StringHuman-readable message
suggestion: Option<String>Suggested alternative or fix
doc_link: Option<String>Link to documentation
Implementations§
Source§impl ConversionWarning
impl ConversionWarning
Sourcepub fn warning(file: PathBuf, pattern: &str, message: &str) -> Self
pub fn warning(file: PathBuf, pattern: &str, message: &str) -> Self
Create a warning-level warning
Sourcepub fn unsupported(file: PathBuf, pattern: &str, alternative: &str) -> Self
pub fn unsupported(file: PathBuf, pattern: &str, alternative: &str) -> Self
Create an unsupported feature warning
Sourcepub fn security(
file: PathBuf,
pattern: &str,
message: &str,
alternative: &str,
) -> Self
pub fn security( file: PathBuf, pattern: &str, message: &str, alternative: &str, ) -> Self
Create a security warning
Sourcepub fn gitops(
file: PathBuf,
pattern: &str,
message: &str,
alternative: &str,
) -> Self
pub fn gitops( file: PathBuf, pattern: &str, message: &str, alternative: &str, ) -> Self
Create a GitOps compatibility warning
Sourcepub fn with_suggestion(self, suggestion: &str) -> Self
pub fn with_suggestion(self, suggestion: &str) -> Self
Add suggestion to warning
Sourcepub fn with_doc_link(self, url: &str) -> Self
pub fn with_doc_link(self, url: &str) -> Self
Add documentation link
Sourcepub fn with_category(self, category: WarningCategory) -> Self
pub fn with_category(self, category: WarningCategory) -> Self
Set category
Trait Implementations§
Source§impl Clone for ConversionWarning
impl Clone for ConversionWarning
Source§fn clone(&self) -> ConversionWarning
fn clone(&self) -> ConversionWarning
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 ConversionWarning
impl Debug for ConversionWarning
Auto Trait Implementations§
impl Freeze for ConversionWarning
impl RefUnwindSafe for ConversionWarning
impl Send for ConversionWarning
impl Sync for ConversionWarning
impl Unpin for ConversionWarning
impl UnwindSafe for ConversionWarning
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