pub struct CapsuleStore { /* private fields */ }Implementations§
Source§impl CapsuleStore
impl CapsuleStore
pub fn new() -> Self
pub fn register(&self, data: &[u8]) -> String
pub fn fork(&self, parent_ref: &str, budget_tokens: u64) -> OclaResult<String>
pub fn resolve(&self, capsule_ref: &str) -> OclaResult<Vec<u8>>
pub fn apply_delta(&self, capsule_ref: &str, delta: Delta) -> OclaResult<()>
pub fn merge_back(&self, child_ref: &str) -> OclaResult<()>
Sourcepub fn snapshot(&self, capsule_ref: &str) -> OclaResult<CapsuleSnapshot>
pub fn snapshot(&self, capsule_ref: &str) -> OclaResult<CapsuleSnapshot>
Creates a snapshot of the current capsule state for potential rollback.
Sourcepub fn rollback(&self, capsule_ref: &str, snapshot_id: &str) -> OclaResult<()>
pub fn rollback(&self, capsule_ref: &str, snapshot_id: &str) -> OclaResult<()>
Rolls back a capsule to a previous snapshot.
Sourcepub fn compute_handoff_delta(
&self,
from_ref: &str,
to_ref: &str,
) -> OclaResult<HandoffDelta>
pub fn compute_handoff_delta( &self, from_ref: &str, to_ref: &str, ) -> OclaResult<HandoffDelta>
Computes a compressed delta between two capsule versions.
Sourcepub fn apply_handoff_delta(
&self,
base_ref: &str,
delta: &HandoffDelta,
) -> OclaResult<String>
pub fn apply_handoff_delta( &self, base_ref: &str, delta: &HandoffDelta, ) -> OclaResult<String>
Applies a handoff delta to create a new capsule version.
pub fn stats(&self) -> CapsuleStats
Trait Implementations§
Source§impl Clone for CapsuleStore
impl Clone for CapsuleStore
Source§fn clone(&self) -> CapsuleStore
fn clone(&self) -> CapsuleStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CapsuleStore
impl Debug for CapsuleStore
Source§impl Default for CapsuleStore
impl Default for CapsuleStore
Source§fn default() -> CapsuleStore
fn default() -> CapsuleStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CapsuleStore
impl RefUnwindSafe for CapsuleStore
impl Send for CapsuleStore
impl Sync for CapsuleStore
impl Unpin for CapsuleStore
impl UnsafeUnpin for CapsuleStore
impl UnwindSafe for CapsuleStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more