pub struct ContextSnapshot { /* private fields */ }Expand description
Durable, verified context snapshot for storage adapters.
This is the supported rehydration boundary for embedders such as Helms.
Storage persists this value and later calls ContextState::from_snapshot.
It must not reconstruct facts through promotion constructors.
Implementations§
Source§impl ContextSnapshot
impl ContextSnapshot
Sourcepub fn from_context(context: &ContextState) -> Self
pub fn from_context(context: &ContextState) -> Self
Build a storage snapshot from a live context.
Sourcepub fn merkle_root(&self) -> &MerkleRoot
pub fn merkle_root(&self) -> &MerkleRoot
Returns the snapshot Merkle root.
Sourcepub fn facts(&self) -> &BTreeMap<ContextKey, Vec<ContextFact>>
pub fn facts(&self) -> &BTreeMap<ContextKey, Vec<ContextFact>>
Returns fact projections grouped by context key.
Sourcepub fn proposals(&self) -> &BTreeMap<ContextKey, Vec<ProposedFact>>
pub fn proposals(&self) -> &BTreeMap<ContextKey, Vec<ProposedFact>>
Returns staged proposals grouped by context key.
Trait Implementations§
Source§impl Clone for ContextSnapshot
impl Clone for ContextSnapshot
Source§fn clone(&self) -> ContextSnapshot
fn clone(&self) -> ContextSnapshot
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 ContextSnapshot
impl Debug for ContextSnapshot
Auto Trait Implementations§
impl Freeze for ContextSnapshot
impl !RefUnwindSafe for ContextSnapshot
impl Send for ContextSnapshot
impl Sync for ContextSnapshot
impl Unpin for ContextSnapshot
impl UnsafeUnpin for ContextSnapshot
impl !UnwindSafe for ContextSnapshot
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