Skip to main content

Provenance

Struct Provenance 

Source
pub struct Provenance { /* private fields */ }
Expand description

The inspectable record of ONE derivation.

The identity answers “which thing is this?” and is thirty-two bytes; the record answers “where did those thirty-two bytes come from?” and is inspection material. They are separate values so neither constrains the other: the transcript can be complete because it is not stored, and the record can be honest because it is written once where the derivation happened rather than copied everywhere the identity goes.

The material is stated by its LENGTH and not carried, because material is unbounded and a record that copied it would double every rendering in memory to say something the rendered unit already holds. That length is not a fold and identifies nothing; the identity is what commits to the material, at full width.

Implementations§

Source§

impl Provenance

Source

pub const fn subject_stem(&self) -> &'static str

The stem of whoever owns the subject this derivation named.

Source

pub const fn subject(&self) -> &'static str

The identity subject this derivation named.

Source

pub const fn role(&self) -> Role

The seat it stood in.

Source

pub const fn profile(&self) -> Profile

The grammar and version it was derived under.

Source

pub const fn generator(&self) -> GeneratorIdentity

The generator that derived it.

Source

pub const fn anchoring(&self) -> Anchoring

What it hung off, anchor included.

Source

pub const fn material_length(&self) -> u64

How many bytes of material went into the transcript.

Source

pub const fn position(&self) -> u32

The position inside the anchor’s declared sequence.

Source

pub fn context(&self) -> String

The derive-key context this derivation ran under.

Source

pub fn under_current_shape(&self) -> bool

Whether this derivation was recorded under the generator and rendered shape this crate declares today.

§Nonclaims

A false says a different generator shape produced the record. It says nothing about whether the material moved, whether the identity would re-derive the same, or whether anything needs redoing.

Trait Implementations§

Source§

impl Clone for Provenance

Source§

fn clone(&self) -> Provenance

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Provenance

Source§

impl Debug for Provenance

Source§

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

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

impl Eq for Provenance

Source§

impl Hash for Provenance

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Provenance

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Provenance

Auto Trait Implementations§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.