pub struct SnapshotReader { /* private fields */ }Expand description
Atomic version-and-items snapshot access without mutation authority.
ⓘ
use reef_core::transcript::store;
let snapshots = store::Store::new().snapshot_reader();
snapshots.replace(Vec::new());Implementations§
Source§impl SnapshotReader
impl SnapshotReader
Sourcepub fn snapshot(&self) -> Result<Snapshot, Error>
pub fn snapshot(&self) -> Result<Snapshot, Error>
Atomically captures a shared immutable history and its version.
§Errors
Error::Poisoned if a writer panicked while holding the store lock.
There is no partial capture: a snapshot either observes one version
together with the items that belong to it, or reports the poison.
Trait Implementations§
Source§impl Clone for SnapshotReader
impl Clone for SnapshotReader
Auto Trait Implementations§
impl Freeze for SnapshotReader
impl RefUnwindSafe for SnapshotReader
impl Send for SnapshotReader
impl Sync for SnapshotReader
impl Unpin for SnapshotReader
impl UnsafeUnpin for SnapshotReader
impl UnwindSafe for SnapshotReader
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