btrfs_diskformat/core/key.rs
1use static_assertions::const_assert_eq;
2use zerocopy::little_endian::U64 as U64LE;
3use zerocopy_derive::*;
4
5/// A key used to describe and locate any item in any tree.
6#[derive(Copy, Clone, Debug, IntoBytes, FromBytes, Unaligned, KnownLayout, Immutable)]
7#[repr(C, packed)]
8pub struct Key {
9 pub objectid: U64LE,
10 pub key_type: u8,
11 pub offset: U64LE,
12}
13const_assert_eq!(core::mem::size_of::<Key>(), 17);