Struct StorageSnapshot
pub struct StorageSnapshot { /* private fields */ }Expand description
Trial deltas and side state read for one study observation.
This type is deliberately not serialized as a public persistence format.
Remote transport owns a versioned wire representation instead. Because this
is the raw storage seam, explicitly requested foreign scopes remain in
states; crate::study::StudySnapshot applies typed one-study filtering.
Implementations§
§impl StorageSnapshot
impl StorageSnapshot
pub fn new(
deltas: Vec<TrialDelta>,
cursor: Cursor,
states: BTreeMap<Scope, StateBlob>,
outboxes: Vec<OutboxRecord>,
consistency: SnapshotConsistency,
) -> Self
pub fn new( deltas: Vec<TrialDelta>, cursor: Cursor, states: BTreeMap<Scope, StateBlob>, outboxes: Vec<OutboxRecord>, consistency: SnapshotConsistency, ) -> Self
Constructs a snapshot from backend-owned read results.
pub fn deltas(&self) -> &[TrialDelta]
pub fn deltas(&self) -> &[TrialDelta]
Whole-trial deltas returned by this read.
pub const fn states(&self) -> &BTreeMap<Scope, StateBlob>
pub const fn states(&self) -> &BTreeMap<Scope, StateBlob>
Present requested state values, in scope order. Missing requested state is absent from this map.
pub fn outboxes(&self) -> &[OutboxRecord]
pub fn outboxes(&self) -> &[OutboxRecord]
Durable finalization records belonging to this study, in key order.
pub const fn consistency(&self) -> SnapshotConsistency
pub const fn consistency(&self) -> SnapshotConsistency
Whether the backend used one read epoch or the compatible fallback.
Trait Implementations§
§impl Clone for StorageSnapshot
impl Clone for StorageSnapshot
§fn clone(&self) -> StorageSnapshot
fn clone(&self) -> StorageSnapshot
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 more§impl Debug for StorageSnapshot
impl Debug for StorageSnapshot
§impl PartialEq for StorageSnapshot
impl PartialEq for StorageSnapshot
impl StructuralPartialEq for StorageSnapshot
Auto Trait Implementations§
impl Freeze for StorageSnapshot
impl RefUnwindSafe for StorageSnapshot
impl Send for StorageSnapshot
impl Sync for StorageSnapshot
impl Unpin for StorageSnapshot
impl UnsafeUnpin for StorageSnapshot
impl UnwindSafe for StorageSnapshot
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