btrfs_no_std/core/
key.rs

1use {
2    byteorder::LE,
3    static_assertions::const_assert_eq,
4    zerocopy::{AsBytes, FromBytes, Unaligned, U64},
5};
6
7/// A key used to describe and locate any item in any tree.
8#[derive(Copy, Clone, Debug, AsBytes, FromBytes, Unaligned)]
9#[repr(C, packed)]
10pub struct Key {
11    pub objectid: U64<LE>,
12    pub r#type: u8,
13    pub offset: U64<LE>,
14}
15const_assert_eq!(core::mem::size_of::<Key>(), 17);