Skip to main content

CommitPlan

Struct CommitPlan 

Source
pub struct CommitPlan<'a> { /* private fields */ }
Expand description

Borrowed exact transaction artifact accepted by the trusted committer.

Implementations§

Source§

impl<'a> CommitPlan<'a>

Source

pub fn new( binding: &TransactionBinding, diff: &'a CanonicalDiff, read_set: &'a BTreeMap<VPath, ReadObservation>, write_set: &'a BTreeMap<VPath, WritePrecondition>, ) -> Result<Self, CommitPlanError>

Validate that diff and dependency digests match the transaction binding.

§Errors

Returns an error for digest mismatch, reserved paths, missing write preconditions, or unmaterialized final content.

§Panics

Panics only if the compile-time trusted runtime-directory name stops satisfying VPath rules.

Source

pub fn transaction(&self) -> TransactionId

Return the transaction ID derived from the exact binding.

Source

pub const fn base_snapshot(&self) -> SnapshotId

Return the immutable base snapshot identity.

Source

pub const fn binding(&self) -> TransactionBinding

Return the complete identity binding.

Source

pub const fn diff(&self) -> &CanonicalDiff

Return the canonical final diff.

Source

pub const fn read_set(&self) -> &BTreeMap<VPath, ReadObservation>

Return dependencies observed by virtual execution.

Source

pub const fn write_set(&self) -> &BTreeMap<VPath, WritePrecondition>

Return base preconditions for all virtual writes.

Auto Trait Implementations§

§

impl<'a> Freeze for CommitPlan<'a>

§

impl<'a> RefUnwindSafe for CommitPlan<'a>

§

impl<'a> Send for CommitPlan<'a>

§

impl<'a> Sync for CommitPlan<'a>

§

impl<'a> Unpin for CommitPlan<'a>

§

impl<'a> UnsafeUnpin for CommitPlan<'a>

§

impl<'a> UnwindSafe for CommitPlan<'a>

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> 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, 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.