pub struct SegmentId(pub u32);
Expand description
Semantic type for segment identifiers, as an opacified integer.
Since segment identifiers are reused between incremental runs, and new
segments can be inserted between any two existing segments, the internal
numeric order of segment identifiers need not mean anything at all and is
not exposed. If you need to compare segment identifiers for order, get a
reference to the database’s SegmentOrder
object.
Tuple Fields§
§0: u32
Trait Implementations§
Source§impl Comparer<SegmentId> for Database
impl Comparer<SegmentId> for Database
Source§fn cmp(&self, left: &SegmentId, right: &SegmentId) -> Ordering
fn cmp(&self, left: &SegmentId, right: &SegmentId) -> Ordering
Compares two objects, like
Ord::cmp
, but with additional state data
from the comparer that can be used for the ordering.impl Copy for SegmentId
impl Eq for SegmentId
impl StructuralPartialEq for SegmentId
Auto Trait Implementations§
impl Freeze for SegmentId
impl RefUnwindSafe for SegmentId
impl Send for SegmentId
impl Sync for SegmentId
impl Unpin for SegmentId
impl UnwindSafe for SegmentId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more