pub struct Incident {
pub file_uri: String,
pub line_number: Option<u32>,
pub code_location: Option<Location>,
pub message: String,
pub code_snip: Option<String>,
pub variables: BTreeMap<String, Value>,
pub effort: Option<i64>,
pub links: Vec<ExternalLink>,
pub is_dependency_incident: bool,
}Expand description
A single match/incident found by the provider.
This is the canonical Konveyor incident type that maps to both:
- gRPC
IncidentContextmessage (for Konveyor provider mode) - Konveyor output incident (for analysis output consumed by fix tooling)
Fields§
§file_uri: StringFile URI where the incident was found (e.g. file:///path/to/File.tsx).
Accepts both fileURI (gRPC/provider format) and uri (kantra output format).
line_number: Option<u32>Line number of the match (1-indexed).
code_location: Option<Location>Source code location (start/end positions). Present when produced by scanners, absent in kantra serialized output.
message: StringHuman-readable message about the incident.
code_snip: Option<String>Surrounding source code snippet for context.
variables: BTreeMap<String, Value>Provider-specific variables (e.g., matched text, symbol name).
effort: Option<i64>Optional effort override for this specific incident.
links: Vec<ExternalLink>Associated hyperlinks.
is_dependency_incident: boolWhether this incident is from a dependency (vs. source code).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Incident
impl<'de> Deserialize<'de> for Incident
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Incident, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Incident, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Incident
impl Serialize for Incident
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 Incident
impl RefUnwindSafe for Incident
impl Send for Incident
impl Sync for Incident
impl Unpin for Incident
impl UnsafeUnpin for Incident
impl UnwindSafe for Incident
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