Struct spacetimedb_table::indexes::RowPointer
source · pub struct RowPointer(pub u64);
Expand description
Offset to a buffer inside Pages
referring
to the index of a specific page
and the offset within the page.
Tuple Fields§
§0: u64
Implementations§
source§impl RowPointer
impl RowPointer
sourcepub const fn new(
reserved_bit: bool,
page_index: PageIndex,
page_offset: PageOffset,
squashed_offset: SquashedOffset
) -> Self
pub const fn new( reserved_bit: bool, page_index: PageIndex, page_offset: PageOffset, squashed_offset: SquashedOffset ) -> Self
Returns a row pointer that is at the given page_offset
,
in the page with page_index
,
and with the squashed_offset
(savepoint offset).
sourcepub const fn reserved_bit(self) -> bool
pub const fn reserved_bit(self) -> bool
Returns the reserved bit.
sourcepub const fn page_index(self) -> PageIndex
pub const fn page_index(self) -> PageIndex
Returns the index of the page.
sourcepub const fn page_offset(self) -> PageOffset
pub const fn page_offset(self) -> PageOffset
Returns the offset within the page.
sourcepub const fn squashed_offset(self) -> SquashedOffset
pub const fn squashed_offset(self) -> SquashedOffset
Returns the squashed offset, i.e., the savepoint offset.
sourcepub const fn with_reserved_bit(self, reserved_bit: bool) -> Self
pub const fn with_reserved_bit(self, reserved_bit: bool) -> Self
Returns a new row pointer
with its reserved bit changed to reserved_bit
.
sourcepub const fn with_page_index(self, page_index: PageIndex) -> Self
pub const fn with_page_index(self, page_index: PageIndex) -> Self
Returns a new row pointer
with its PageIndex
changed to page_index
.
sourcepub const fn with_page_offset(self, page_offset: PageOffset) -> Self
pub const fn with_page_offset(self, page_offset: PageOffset) -> Self
Returns a new row pointer
with its PageOffset
changed to page_offset
.
sourcepub const fn with_squashed_offset(self, squashed_offset: SquashedOffset) -> Self
pub const fn with_squashed_offset(self, squashed_offset: SquashedOffset) -> Self
Returns a new row pointer
with its SquashedOffset
changed to squashed_offset
.
Trait Implementations§
source§impl Clone for RowPointer
impl Clone for RowPointer
source§fn clone(&self) -> RowPointer
fn clone(&self) -> RowPointer
Returns a copy of the value. Read more
1.0.0 · 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 RowPointer
impl Debug for RowPointer
source§impl Hash for RowPointer
impl Hash for RowPointer
source§impl Ord for RowPointer
impl Ord for RowPointer
source§fn cmp(&self, other: &RowPointer) -> Ordering
fn cmp(&self, other: &RowPointer) -> Ordering
1.21.0 · 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 RowPointer
impl PartialEq for RowPointer
source§fn eq(&self, other: &RowPointer) -> bool
fn eq(&self, other: &RowPointer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RowPointer
impl PartialOrd for RowPointer
source§fn partial_cmp(&self, other: &RowPointer) -> Option<Ordering>
fn partial_cmp(&self, other: &RowPointer) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for RowPointer
impl Eq for RowPointer
impl StructuralPartialEq for RowPointer
Auto Trait Implementations§
impl Freeze for RowPointer
impl RefUnwindSafe for RowPointer
impl Send for RowPointer
impl Sync for RowPointer
impl Unpin for RowPointer
impl UnwindSafe for RowPointer
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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