pub struct FindingBundle {Show 15 fields
pub id: String,
pub version: u32,
pub previous_version: Option<String>,
pub assertion: Assertion,
pub evidence: Evidence,
pub conditions: Conditions,
pub confidence: Confidence,
pub provenance: Provenance,
pub flags: Flags,
pub links: Vec<Link>,
pub annotations: Vec<Annotation>,
pub attachments: Vec<Attachment>,
pub created: String,
pub updated: Option<String>,
pub access_tier: AccessTier,
}Fields§
§id: String§version: u32§previous_version: Option<String>§assertion: Assertion§evidence: Evidence§conditions: Conditions§confidence: Confidence§provenance: Provenance§flags: Flags§links: Vec<Link>§annotations: Vec<Annotation>§attachments: Vec<Attachment>§created: String§updated: Option<String>§access_tier: AccessTierv0.51: Read-side access tier. Default Public — pre-v0.51
findings load with Public and serialize byte-identically
(skip-if-public). Mutated through tier.set events; gated in
MCP/HTTP read paths via access_tier::redact_for_actor. NOT
part of the content-address preimage — re-classifying a
finding does not mint a new id.
Implementations§
Source§impl FindingBundle
impl FindingBundle
Sourcepub fn normalize_text(s: &str) -> String
pub fn normalize_text(s: &str) -> String
Create a new finding bundle with a content-addressed ID.
Normalize text for content-addressing: lowercase, collapse whitespace,
strip trailing punctuation. Matches the v0.2.0 schema specification.
Public since v0.32 so Replication::content_address can reuse the
same canonicalization rule for its conditions preimage.
Sourcepub fn content_address(assertion: &Assertion, provenance: &Provenance) -> String
pub fn content_address(assertion: &Assertion, provenance: &Provenance) -> String
Compute the content-addressed ID per v0.2.0 spec: SHA-256(normalize(assertion.text) + “|” + assertion.type + “|” + (provenance.doi || provenance.pmid || provenance.title)) Returns first 16 hex chars prefixed with “vf_”.
pub fn new( assertion: Assertion, evidence: Evidence, conditions: Conditions, confidence: Confidence, provenance: Provenance, flags: Flags, ) -> Self
pub fn add_link(&mut self, target_id: &str, link_type: &str, note: &str)
pub fn add_link_with_source( &mut self, target_id: &str, link_type: &str, note: &str, inferred_by: &str, )
Trait Implementations§
Source§impl Clone for FindingBundle
impl Clone for FindingBundle
Source§fn clone(&self) -> FindingBundle
fn clone(&self) -> FindingBundle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more