#[repr(C)]pub struct VarLenRef {
pub length_in_bytes: u16,
pub first_granule: PageOffset,
}Expand description
Reference to var-len object within a page.
Fields§
§length_in_bytes: u16The length of the var-len object in bytes.
When self.is_large_blob() returns true,
this is not the proper length of the object.
Rather, the blob store must be consulted for the true length.
first_granule: PageOffsetThe offset to the first granule containing some of the object’s data as well a pointer to the next granule.
Implementations§
Source§impl VarLenRef
impl VarLenRef
Sourcepub const LARGE_BLOB_SENTINEL: u16 = 65_535u16
pub const LARGE_BLOB_SENTINEL: u16 = 65_535u16
The sentinel for a var-len ref to a large blob.
Sourcepub const NULL: Self
pub const NULL: Self
The NULL var-len reference for empty variable components.
A null VarLenRef can occur when a row has no var-len component
or needs to point to one that is empty.
Sourcepub const fn is_large_blob(self) -> bool
pub const fn is_large_blob(self) -> bool
Does this refer to a large blob object
where self.first_granule is a blob hash?
Sourcepub const fn large_blob(first_granule: PageOffset) -> Self
pub const fn large_blob(first_granule: PageOffset) -> Self
Returns a var-len ref for a large blob object.
Sourcepub const fn granules_used(&self) -> usize
pub const fn granules_used(&self) -> usize
Returns the number of granules this var-len ref uses in it page.
Trait Implementations§
Source§impl Ord for VarLenRef
impl Ord for VarLenRef
Source§impl PartialOrd for VarLenRef
impl PartialOrd for VarLenRef
impl Copy for VarLenRef
impl Eq for VarLenRef
impl StructuralPartialEq for VarLenRef
Auto Trait Implementations§
impl Freeze for VarLenRef
impl RefUnwindSafe for VarLenRef
impl Send for VarLenRef
impl Sync for VarLenRef
impl Unpin for VarLenRef
impl UnwindSafe for VarLenRef
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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