pub struct Diagnostic {Show 15 fields
pub rule_id: String,
pub severity: Severity,
pub message: String,
pub source: RuleOrigin,
pub entity: Option<Entity>,
pub property_path: Option<String>,
pub suggested_fix: Option<String>,
pub documentation_url: Option<String>,
pub category: Option<String>,
pub location: Option<SourceSpan>,
pub related_resources: Option<Vec<RelatedResource>>,
pub condition_scenario: Option<HashMap<String, bool>>,
pub rule_description: Option<String>,
pub phase: Option<Phase>,
pub context: Option<ViolationContext>,
}Fields§
§rule_id: String§severity: Severity§message: String§source: RuleOrigin§entity: Option<Entity>The named template entity this finding targets, if any.
property_path: Option<String>§suggested_fix: Option<String>§documentation_url: Option<String>§category: Option<String>§location: Option<SourceSpan>§condition_scenario: Option<HashMap<String, bool>>§rule_description: Option<String>§phase: Option<Phase>§context: Option<ViolationContext>Implementations§
Source§impl Diagnostic
impl Diagnostic
Sourcepub fn resource_logical_id(&self) -> Option<&str>
pub fn resource_logical_id(&self) -> Option<&str>
Logical ID of the targeted entity when it is a resource, None otherwise.
Source§impl Diagnostic
impl Diagnostic
Sourcepub fn to_report(&self, detail_level: DetailLevel) -> Diagnostic
pub fn to_report(&self, detail_level: DetailLevel) -> Diagnostic
Projects this diagnostic into the public flattened shape. The enrichment
fields (documentation_url, rule_description, phase, context) are
carried through only at the DETAILED detail level; the STANDARD detail
level leaves them None so serialization omits them.
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Diagnostic
impl Debug for Diagnostic
Source§impl<'de> Deserialize<'de> for Diagnostic
impl<'de> Deserialize<'de> for Diagnostic
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Diagnostic, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Diagnostic, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Filterable for Diagnostic
impl Filterable for Diagnostic
Source§impl Serialize for Diagnostic
impl Serialize for Diagnostic
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 Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnsafeUnpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§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