#[non_exhaustive]pub struct Issue {
pub code: IssueCode,
pub severity: Severity,
pub path: AuthoredPath,
pub step_kind: Option<StepKind>,
pub step_id: Option<String>,
pub field: Option<String>,
pub message: String,
}Expand description
One finding about an authored definition.
It serializes as an object of its seven fields, under their own names: the
code and severity as their strings, the path as it displays, the step kind
as task, group or setup, and an absent part as null.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: IssueCodeWhat it is about.
severity: SeverityWhen it bites: its code’s own severity, unless the host overrode it.
path: AuthoredPathWhere in the authored JSON.
step_kind: Option<StepKind>The kind of step it sits in, if any.
step_id: Option<String>The id of the step it sits in, if known.
field: Option<String>The config field (the first key under function.input), if inside one.
message: StringA human-readable explanation.
Implementations§
Source§impl Issue
impl Issue
Sourcepub fn new(
code: IssueCode,
path: AuthoredPath,
message: impl Into<String>,
) -> Self
pub fn new( code: IssueCode, path: AuthoredPath, message: impl Into<String>, ) -> Self
An issue at its code’s default severity.
Sourcepub fn with_severity(self, severity: Severity) -> Self
pub fn with_severity(self, severity: Severity) -> Self
Overrides the severity.
Sourcepub fn with_step(self, kind: StepKind, id: Option<&str>) -> Self
pub fn with_step(self, kind: StepKind, id: Option<&str>) -> Self
Names the step the issue sits in.
Sourcepub fn with_field(self, field: impl Into<String>) -> Self
pub fn with_field(self, field: impl Into<String>) -> Self
Names the config field the issue sits in.
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
impl Eq for Issue
impl StructuralPartialEq for Issue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.