pub struct WalSegmentId(/* private fields */);Expand description
Durable id for one WAL segment.
Implementations§
Source§impl WalSegmentId
impl WalSegmentId
Source§impl WalSegmentId
impl WalSegmentId
Sourcepub fn generate(start_seq: ChangeSeq) -> Self
pub fn generate(start_seq: ChangeSeq) -> Self
WAL segment ids order by history position and stay unique under races.
The 20-digit prefix is the segment’s start_seq, so listings sort by
position and reclamation can range-scan below a boundary cursor. The
16-hex suffix keeps speculative writes unique: racing writers proposing
different segments for the same position never collide, and the head
compare-and-swap chooses among them. The name is an inspection and
reclamation hint only — recovery authority is the head and chain.
Trait Implementations§
Source§impl AsRef<str> for WalSegmentId
impl AsRef<str> for WalSegmentId
Source§impl Borrow<str> for WalSegmentId
impl Borrow<str> for WalSegmentId
Source§impl Clone for WalSegmentId
impl Clone for WalSegmentId
Source§fn clone(&self) -> WalSegmentId
fn clone(&self) -> WalSegmentId
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 moreSource§impl Debug for WalSegmentId
impl Debug for WalSegmentId
Source§impl<'de> Deserialize<'de> for WalSegmentId
impl<'de> Deserialize<'de> for WalSegmentId
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 Display for WalSegmentId
impl Display for WalSegmentId
impl Eq for WalSegmentId
Source§impl FromStr for WalSegmentId
impl FromStr for WalSegmentId
Source§impl Hash for WalSegmentId
impl Hash for WalSegmentId
Source§impl Ord for WalSegmentId
impl Ord for WalSegmentId
Source§fn cmp(&self, other: &WalSegmentId) -> Ordering
fn cmp(&self, other: &WalSegmentId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for WalSegmentId
impl PartialEq for WalSegmentId
Source§impl PartialOrd for WalSegmentId
impl PartialOrd for WalSegmentId
Source§impl Serialize for WalSegmentId
impl Serialize for WalSegmentId
impl StructuralPartialEq for WalSegmentId
Source§impl TryFrom<&str> for WalSegmentId
impl TryFrom<&str> for WalSegmentId
Auto Trait Implementations§
impl Freeze for WalSegmentId
impl RefUnwindSafe for WalSegmentId
impl Send for WalSegmentId
impl Sync for WalSegmentId
impl Unpin for WalSegmentId
impl UnsafeUnpin for WalSegmentId
impl UnwindSafe for WalSegmentId
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