use {
byteorder::LE,
num_enum::{IntoPrimitive, TryFromPrimitive},
static_assertions::const_assert_eq,
strum::EnumIter,
zerocopy::{AsBytes, FromBytes, Unaligned, U64},
};
#[derive(Copy, Clone, Debug, AsBytes, FromBytes, Unaligned)]
#[repr(C, packed)]
pub struct ExtentInlineRef {
pub r#type: u8,
pub offset: U64<LE>,
}
const_assert_eq!(std::mem::size_of::<ExtentInlineRef>(), 9);
#[derive(Copy, Clone, Debug, Hash, PartialEq, EnumIter, IntoPrimitive, TryFromPrimitive)]
#[repr(u8)]
pub enum ExtentInlineRefType {
TreeBlockRef = 176,
SharedBlockRef = 182,
ExtentDataRef = 178,
SharedDataRef = 184,
}