pub struct SerializableReadContext { /* private fields */ }Expand description
A retained reader attributes observations to its original transaction, even after session refresh or nested view cloning. This does not create another participant or give the reader ownership of transaction completion.
Implementations§
Source§impl SerializableReadContext
impl SerializableReadContext
pub fn id(&self) -> SerializableTransactionId
Sourcepub fn read_control(
&self,
cancellation: &CancellationToken,
) -> StorageReadControl
pub fn read_control( &self, cancellation: &CancellationToken, ) -> StorageReadControl
Retain the original session’s allowance while observing cancellation from the invoking reader. Cloning a context or attaching a nested reader does not grant another observation budget.
Sourcepub fn observe_read(
&self,
predicate: SerializablePredicate<'_>,
control: &StorageReadControl,
) -> VersionResult<()>
pub fn observe_read( &self, predicate: SerializablePredicate<'_>, control: &StorageReadControl, ) -> VersionResult<()>
Observe the logical predicate before exposing its result, including an empty, cached or index-only result. Proven safe snapshots need only the original participant’s lifetime check. Physical record keys are not a substitute for logical object/row/index identities.
pub fn safe_snapshot( &self, control: &StorageReadControl, ) -> VersionResult<SafeSnapshot>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SerializableReadContext
impl !UnwindSafe for SerializableReadContext
impl Freeze for SerializableReadContext
impl Send for SerializableReadContext
impl Sync for SerializableReadContext
impl Unpin for SerializableReadContext
impl UnsafeUnpin for SerializableReadContext
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