smb_dtyp/binrw_util/
debug.rs1#![cfg(debug_assertions)]
2use binrw::prelude::*;
5
6#[derive(Debug, Default, PartialEq, Eq)]
8pub struct LogLocation {}
9
10impl BinRead for LogLocation {
11 type Args<'a> = ();
12 fn read_options<R: std::io::Read + std::io::Seek>(
13 reader: &mut R,
14 _endian: binrw::Endian,
15 _args: Self::Args<'_>,
16 ) -> BinResult<Self> {
17 dbg!(("Reading log location is: ", reader.stream_position()?));
18 Ok(LogLocation {})
19 }
20}
21impl BinWrite for LogLocation {
22 type Args<'a> = ();
23 fn write_options<W: std::io::Write + std::io::Seek>(
24 &self,
25 writer: &mut W,
26 _endian: binrw::Endian,
27 _args: Self::Args<'_>,
28 ) -> BinResult<()> {
29 dbg!(("Writing log location is: ", writer.stream_position()?));
30 Ok(())
31 }
32}