pub struct ProvenanceChain {
pub nodes: Vec<ProvenanceNode>,
}Expand description
A causal chain tracking how a block came to exist. Answers: “Agent X produced this because of Y, authorized by Z.”
Fields§
§nodes: Vec<ProvenanceNode>Implementations§
Source§impl ProvenanceChain
impl ProvenanceChain
pub fn with_cause(self, cause: CauseKind, actor: ActorId) -> Self
Sourcepub fn immediate_cause(&self) -> Option<&ProvenanceNode>
pub fn immediate_cause(&self) -> Option<&ProvenanceNode>
The immediate cause — the last node in the chain.
Sourcepub fn root_cause(&self) -> Option<&ProvenanceNode>
pub fn root_cause(&self) -> Option<&ProvenanceNode>
The root cause — the first node (usually a human prompt).
Trait Implementations§
Source§impl Clone for ProvenanceChain
impl Clone for ProvenanceChain
Source§fn clone(&self) -> ProvenanceChain
fn clone(&self) -> ProvenanceChain
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProvenanceChain
impl Debug for ProvenanceChain
Source§impl Default for ProvenanceChain
impl Default for ProvenanceChain
Source§fn default() -> ProvenanceChain
fn default() -> ProvenanceChain
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProvenanceChain
impl<'de> Deserialize<'de> for ProvenanceChain
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
Auto Trait Implementations§
impl Freeze for ProvenanceChain
impl RefUnwindSafe for ProvenanceChain
impl Send for ProvenanceChain
impl Sync for ProvenanceChain
impl Unpin for ProvenanceChain
impl UnsafeUnpin for ProvenanceChain
impl UnwindSafe for ProvenanceChain
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