MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / file_offset

Method file_offset

crates/environ/src/address_map.rs:50–56  ·  view source on GitHub ↗

Returns the offset that this offset was created with. Note that positions created with `FilePos::none` and the `Default` implementation will return `None` here, whereas positions created with `FilePos::new` will return `Some`.

(self)

Source from the content-addressed store, hash-verified

48 /// implementation will return `None` here, whereas positions created with
49 /// `FilePos::new` will return `Some`.
50 pub fn file_offset(self) -> Option<u32> {
51 if self.0 == u32::MAX {
52 None
53 } else {
54 Some(self.0)
55 }
56 }
57}
58
59impl Default for FilePos {

Callers 10

addrmapMethod · 0.80
get_wasm_code_offsetFunction · 0.80
build_function_lookupFunction · 0.80
build_function_addr_mapFunction · 0.80
address_mapMethod · 0.80
newMethod · 0.80
module_offsetMethod · 0.80
func_offsetMethod · 0.80
address_mapMethod · 0.80
pushMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected