#[repr(C, packed(1))]pub struct ExtentInlineRefFull {
pub ref_type: ExtentInlineRefType,
pub tail: ExtentInlineRefTail,
}
Expand description
This type contains a union of all possible inline extent references. Using this can be helpful when an entire inline reference is read from disk to save trips to the disk but the type of the reference is not known in advance.
For the header-only version, see ExtentInlineRefHeader
.
Fields§
§ref_type: ExtentInlineRefType
This should be equal to ExtentInlineRefType::ExtentDataRef
.
tail: ExtentInlineRefTail
This field has different functions depending on the value of ref_type
.
Implementations§
Source§impl ExtentInlineRefFull
impl ExtentInlineRefFull
Sourcepub fn offset(&self) -> Option<u64>
pub fn offset(&self) -> Option<u64>
Returns the value of the offset field, if it is valid for the given ref_type
.
Sourcepub fn extent_data_ref(&self) -> Option<ExtentDataRef>
pub fn extent_data_ref(&self) -> Option<ExtentDataRef>
Returns the extent data reference if the reference type is
ExtentInlineRefType::ExtentDataRef
.
Returns the shared data tail if the reference type is
ExtentInlineRefType::SharedDataRef
.
pub fn as_tree_block_ref(&self) -> Option<&ExtentInlineTreeBlockRef>
pub fn as_extent_data_ref(&self) -> Option<&ExtentInlineExtentDataRef>
Trait Implementations§
Source§impl Clone for ExtentInlineRefFull
impl Clone for ExtentInlineRefFull
Source§fn clone(&self) -> ExtentInlineRefFull
fn clone(&self) -> ExtentInlineRefFull
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 KnownLayout for ExtentInlineRefFullwhere
ExtentInlineRefTail: KnownLayout,
impl KnownLayout for ExtentInlineRefFullwhere
ExtentInlineRefTail: KnownLayout,
Source§type PointerMetadata = <ExtentInlineRefTail as KnownLayout>::PointerMetadata
type PointerMetadata = <ExtentInlineRefTail as KnownLayout>::PointerMetadata
The type of metadata stored in a pointer to
Self
. Read moreSource§impl TryFromBytes for ExtentInlineRefFull
impl TryFromBytes for ExtentInlineRefFull
Source§fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
Source§fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
Source§fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
Source§fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
Source§fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
Source§fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
impl Copy for ExtentInlineRefFull
impl Immutable for ExtentInlineRefFull
impl Unaligned for ExtentInlineRefFull
Auto Trait Implementations§
impl Freeze for ExtentInlineRefFull
impl RefUnwindSafe for ExtentInlineRefFull
impl Send for ExtentInlineRefFull
impl Sync for ExtentInlineRefFull
impl Unpin for ExtentInlineRefFull
impl UnwindSafe for ExtentInlineRefFull
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