MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / new_with_opts

Method new_with_opts

rust/src/binary_reader.rs:40–53  ·  view source on GitHub ↗
(view: &BinaryView, options: &BinaryReaderOptions)

Source from the content-addressed store, hash-verified

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) }

Callers

nothing calls this directly

Calls 3

set_virtual_baseMethod · 0.80
set_endiannessMethod · 0.45
seek_to_offsetMethod · 0.45

Tested by

no test coverage detected