How to use deku::input #323
-
Hello, first of all thanks for the crate! struct WriteBlock {
checksum: u8,
status: u8,
installdate: Date,
...
} I can successfully read the fields, but now I want to check whether the checksum is valid, maybe using #[deku(assert_eq = "calculate_checksum(deku::input, 200, 32)")] where 200 is the offset of the write block and 32 is the block size in bytes. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The following example might help you:
|
Beta Was this translation helpful? Give feedback.
The following example might help you: