use binread::{BinRead, FilePtr}; #[derive(BinRead)] struct Test { a: u8, #[br(offset = a)] b: FilePtr, #[br(offset_after = d)] c: FilePtr, d: u8, } fn main() {}