(view: &BinaryView, options: &BinaryReaderOptions)
| 38 | } |
| 39 | |
| 40 | pub fn new_with_opts(view: &BinaryView, options: &BinaryReaderOptions) -> Self { |
| 41 | let mut reader = Self::new(view); |
| 42 | if let Some(endianness) = options.endianness { |
| 43 | reader.set_endianness(endianness); |
| 44 | } |
| 45 | // Set the virtual base before we seek. |
| 46 | if let Some(virtual_base) = options.virtual_base { |
| 47 | reader.set_virtual_base(virtual_base); |
| 48 | } |
| 49 | if let Some(address) = options.address { |
| 50 | reader.seek_to_offset(address); |
| 51 | } |
| 52 | reader |
| 53 | } |
| 54 | |
| 55 | pub fn endianness(&self) -> Endianness { |
| 56 | unsafe { BNGetBinaryReaderEndianness(self.handle) } |
nothing calls this directly
no test coverage detected