[go: up one dir, main page]

Result

Struct Result 

Source
pub struct Result {
Show 30 fields pub analysis_target: Option<ArtifactLocation>, pub attachments: Option<Vec<Attachment>>, pub baseline_state: Option<Value>, pub code_flows: Option<Vec<CodeFlow>>, pub correlation_guid: Option<String>, pub fingerprints: Option<BTreeMap<String, String>>, pub fixes: Option<Vec<Fix>>, pub graph_traversals: Option<Vec<GraphTraversal>>, pub graphs: Option<Vec<Graph>>, pub guid: Option<String>, pub hosted_viewer_uri: Option<String>, pub kind: Option<ResultKind>, pub level: Option<ResultLevel>, pub locations: Option<Vec<Location>>, pub message: Message, pub occurrence_count: Option<i64>, pub partial_fingerprints: Option<BTreeMap<String, String>>, pub properties: Option<PropertyBag>, pub provenance: Option<ResultProvenance>, pub rank: Option<f64>, pub related_locations: Option<Vec<Location>>, pub rule: Option<ReportingDescriptorReference>, pub rule_id: Option<String>, pub rule_index: Option<i64>, pub stacks: Option<Vec<Stack>>, pub suppressions: Option<Vec<Suppression>>, pub taxa: Option<Vec<ReportingDescriptorReference>>, pub web_request: Option<WebRequest>, pub web_response: Option<WebResponse>, pub work_item_uris: Option<Vec<String>>,
}
Expand description

A result produced by an analysis tool.

Fields§

§analysis_target: Option<ArtifactLocation>

Identifies the artifact that the analysis tool was instructed to scan. This need not be the same as the artifact where the result actually occurred.

§attachments: Option<Vec<Attachment>>

A set of artifacts relevant to the result.

§baseline_state: Option<Value>

The state of a result relative to a baseline of a previous run.

§code_flows: Option<Vec<CodeFlow>>

An array of ‘codeFlow’ objects relevant to the result.

§correlation_guid: Option<String>

A stable, unique identifier for the equivalence class of logically identical results to which this result belongs, in the form of a GUID.

§fingerprints: Option<BTreeMap<String, String>>

A set of strings each of which individually defines a stable, unique identity for the result.

§fixes: Option<Vec<Fix>>

An array of ‘fix’ objects, each of which represents a proposed fix to the problem indicated by the result.

§graph_traversals: Option<Vec<GraphTraversal>>

An array of one or more unique ‘graphTraversal’ objects.

§graphs: Option<Vec<Graph>>

An array of zero or more unique graph objects associated with the result.

§guid: Option<String>

A stable, unique identifier for the result in the form of a GUID.

§hosted_viewer_uri: Option<String>

An absolute URI at which the result can be viewed.

§kind: Option<ResultKind>

A value that categorizes results by evaluation state.

§level: Option<ResultLevel>

A value specifying the severity level of the result.

§locations: Option<Vec<Location>>

The set of locations where the result was detected. Specify only one location unless the problem indicated by the result can only be corrected by making a change at every specified location.

§message: Message

A message that describes the result. The first sentence of the message only will be displayed when visible space is limited.

§occurrence_count: Option<i64>

A positive integer specifying the number of times this logically unique result was observed in this run.

§partial_fingerprints: Option<BTreeMap<String, String>>

A set of strings that contribute to the stable, unique identity of the result.

§properties: Option<PropertyBag>

Key/value pairs that provide additional information about the result.

§provenance: Option<ResultProvenance>

Information about how and when the result was detected.

§rank: Option<f64>

A number representing the priority or importance of the result.

§related_locations: Option<Vec<Location>>

A set of locations relevant to this result.

§rule: Option<ReportingDescriptorReference>

A reference used to locate the rule descriptor relevant to this result.

§rule_id: Option<String>

The stable, unique identifier of the rule, if any, to which this result is relevant.

§rule_index: Option<i64>

The index within the tool component rules array of the rule object associated with this result.

§stacks: Option<Vec<Stack>>

An array of ‘stack’ objects relevant to the result.

§suppressions: Option<Vec<Suppression>>

A set of suppressions relevant to this result.

§taxa: Option<Vec<ReportingDescriptorReference>>

An array of references to taxonomy reporting descriptors that are applicable to the result.

§web_request: Option<WebRequest>

A web request associated with this result.

§web_response: Option<WebResponse>

A web response associated with this result.

§work_item_uris: Option<Vec<String>>

The URIs of the work items associated with this result.

Implementations§

Source§

impl Result

Source

pub fn builder() -> ResultBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>

Create a builder for building Result. On the builder, call .analysis_target(...)(optional), .attachments(...)(optional), .baseline_state(...)(optional), .code_flows(...)(optional), .correlation_guid(...)(optional), .fingerprints(...)(optional), .fixes(...)(optional), .graph_traversals(...)(optional), .graphs(...)(optional), .guid(...)(optional), .hosted_viewer_uri(...)(optional), .kind(...)(optional), .level(...)(optional), .locations(...)(optional), .message(...), .occurrence_count(...)(optional), .partial_fingerprints(...)(optional), .properties(...)(optional), .provenance(...)(optional), .rank(...)(optional), .related_locations(...)(optional), .rule(...)(optional), .rule_id(...)(optional), .rule_index(...)(optional), .stacks(...)(optional), .suppressions(...)(optional), .taxa(...)(optional), .web_request(...)(optional), .web_response(...)(optional), .work_item_uris(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of Result.

Trait Implementations§

Source§

impl Clone for Result

Source§

fn clone(&self) -> Result

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Result

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Result

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Result

Source§

fn eq(&self, other: &Result) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Result

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Result

Auto Trait Implementations§

§

impl Freeze for Result

§

impl RefUnwindSafe for Result

§

impl Send for Result

§

impl Sync for Result

§

impl Unpin for Result

§

impl UnwindSafe for Result

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,