pub struct Snapshot {
pub xmin: u64,
pub xmax: u64,
pub xip: Vec<u64>,
}Expand description
A snapshot: the first transaction that is still in progress, the first transaction that did not start, and the transactions in progress between them, in order and with no duplicates.
Fields§
§xmin: u64§xmax: u64§xip: Vec<u64>Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn from_bytes(bytes: &[u8]) -> Option<Snapshot>
pub fn from_bytes(bytes: &[u8]) -> Option<Snapshot>
The snapshot in the bytes that Snapshot::to_bytes gives, or None for bytes of another form.
Sourcepub fn is_visible(&self, xid: u64) -> bool
pub fn is_visible(&self, xid: u64) -> bool
is_visible_fxid: true when the transaction ended before the snapshot. A transaction before xmin ended, a transaction at xmax or after it did not start, and a transaction between them ended when it is not in progress.
Trait Implementations§
impl Eq for Snapshot
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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