pub struct Runtime<'m> { /* private fields */ }Expand description
Accumulates the gated, validated stage summaries of one run, then seals them.
Implementations§
Source§impl<'m> Runtime<'m>
impl<'m> Runtime<'m>
Sourcepub fn start(manifest: &'m DensorManifest) -> Result<Self, RuntimeError>
pub fn start(manifest: &'m DensorManifest) -> Result<Self, RuntimeError>
Start a run against a validated manifest. Validates the manifest up front (fails closed).
Sourcepub fn run_stage<I, O, S: RuntimeStage<I, O>>(
&mut self,
stage: &S,
input: I,
) -> Result<O, RuntimeError>
pub fn run_stage<I, O, S: RuntimeStage<I, O>>( &mut self, stage: &S, input: I, ) -> Result<O, RuntimeError>
Execute one stage on input, gating its authorities first, then recording its receipt summary. Returns
the stage’s typed output so the caller can feed it into the next stage. Deterministic given a deterministic
stage (the runtime adds no nondeterminism).
Sourcepub fn seal(self) -> RuntimeReceiptV1
pub fn seal(self) -> RuntimeReceiptV1
Seal the run: build the tamper-evident RuntimeReceiptV1 over the ordered stage summaries.
Auto Trait Implementations§
impl<'m> Freeze for Runtime<'m>
impl<'m> RefUnwindSafe for Runtime<'m>
impl<'m> Send for Runtime<'m>
impl<'m> Sync for Runtime<'m>
impl<'m> Unpin for Runtime<'m>
impl<'m> UnsafeUnpin for Runtime<'m>
impl<'m> UnwindSafe for Runtime<'m>
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