pub struct EvidenceDerivation { /* private fields */ }Expand description
The exact immutable evidence record(s) a derived record was computed from.
This is derivation lineage, not producer provenance, case correlation, or reasoning support: it names the precise transformation inputs. Parents are stored canonicalized (sorted, de-duplicated) so acceptance never depends on input order and an equivalent lineage is a single stable value. Structural validity (non-empty, bounded, canonical) is enforced here; contextual validity that requires the knowledge store (parent existence, self-reference, cycles, subject agreement) is enforced atomically at insertion time.
Implementations§
Source§impl EvidenceDerivation
impl EvidenceDerivation
Sourcepub fn new(
parents: impl IntoIterator<Item = EvidenceId>,
algorithm: DerivationAlgorithm,
) -> Result<Self, ReasoningModelError>
pub fn new( parents: impl IntoIterator<Item = EvidenceId>, algorithm: DerivationAlgorithm, ) -> Result<Self, ReasoningModelError>
Creates a validated derivation from one or more parent evidence IDs.
Duplicate parents are canonicalized to a single occurrence; the bound is applied to the distinct set. An empty parent set is rejected — a record with no parents is direct evidence, never a zero-parent derivation.
Sourcepub fn parents(&self) -> &[EvidenceId]
pub fn parents(&self) -> &[EvidenceId]
Returns the canonical (sorted, de-duplicated) parent evidence IDs.
Sourcepub fn algorithm(&self) -> &DerivationAlgorithm
pub fn algorithm(&self) -> &DerivationAlgorithm
Returns the transformation identity that produced the child.
Sourcepub fn references_parent(&self, id: &EvidenceId) -> bool
pub fn references_parent(&self, id: &EvidenceId) -> bool
Returns whether the given evidence ID is a parent of this derivation.
Trait Implementations§
Source§impl Clone for EvidenceDerivation
impl Clone for EvidenceDerivation
Source§fn clone(&self) -> EvidenceDerivation
fn clone(&self) -> EvidenceDerivation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EvidenceDerivation
impl Debug for EvidenceDerivation
Source§impl<'de> Deserialize<'de> for EvidenceDerivation
impl<'de> Deserialize<'de> for EvidenceDerivation
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>,
impl Eq for EvidenceDerivation
Source§impl PartialEq for EvidenceDerivation
impl PartialEq for EvidenceDerivation
Source§impl Serialize for EvidenceDerivation
impl Serialize for EvidenceDerivation
impl StructuralPartialEq for EvidenceDerivation
Auto Trait Implementations§
impl Freeze for EvidenceDerivation
impl RefUnwindSafe for EvidenceDerivation
impl Send for EvidenceDerivation
impl Sync for EvidenceDerivation
impl Unpin for EvidenceDerivation
impl UnsafeUnpin for EvidenceDerivation
impl UnwindSafe for EvidenceDerivation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.