pub struct Lsn(/* private fields */);Expand description
Monotonic log sequence number.
LSN 0 is reserved for “empty / never written” so a snapshot’s
wal_lsn = 0 cannot be mistaken for “I checkpointed at the very first
record”. Allocators advance from 1.
Internally an LSN is opaque: callers only rely on the total order. The
representation is left as a single u64 for now; a future change to a
(segment_id, offset) packing is non-breaking because every consumer
goes through these accessors.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lsn
impl<'de> Deserialize<'de> for Lsn
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Lsn
impl Ord for Lsn
Source§impl PartialOrd for Lsn
impl PartialOrd for Lsn
impl Copy for Lsn
impl Eq for Lsn
impl StructuralPartialEq for Lsn
Auto Trait Implementations§
impl Freeze for Lsn
impl RefUnwindSafe for Lsn
impl Send for Lsn
impl Sync for Lsn
impl Unpin for Lsn
impl UnsafeUnpin for Lsn
impl UnwindSafe for Lsn
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