pub struct Provenance {
pub source: String,
pub label: Option<String>,
pub scope_id: Option<String>,
pub scope_kind: Option<ScopeKind>,
pub stream: Option<Stream>,
pub start_line: Option<u64>,
pub end_line: Option<u64>,
pub parser: Option<String>,
}Expand description
Caller and state-machine provenance for one returned finding.
Fields§
§source: String§label: Option<String>§scope_id: Option<String>§scope_kind: Option<ScopeKind>§stream: Option<Stream>§start_line: Option<u64>§end_line: Option<u64>§parser: Option<String>Implementations§
Source§impl Provenance
impl Provenance
pub fn new(source: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_scope(self, scope: &Scope) -> Self
pub fn with_span(self, stream: Stream, start_line: u64, end_line: u64) -> Self
pub fn with_parser(self, parser: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for Provenance
impl Clone for Provenance
Source§impl Debug for Provenance
impl Debug for Provenance
Source§impl<'de> Deserialize<'de> for Provenance
impl<'de> Deserialize<'de> for Provenance
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 Provenance
Source§impl Ord for Provenance
impl Ord for Provenance
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Provenance
impl PartialEq for Provenance
Source§impl PartialOrd for Provenance
impl PartialOrd for Provenance
Source§impl Serialize for Provenance
impl Serialize for Provenance
impl StructuralPartialEq for Provenance
Auto Trait Implementations§
impl Freeze for Provenance
impl RefUnwindSafe for Provenance
impl Send for Provenance
impl Sync for Provenance
impl Unpin for Provenance
impl UnsafeUnpin for Provenance
impl UnwindSafe for Provenance
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