Skip to content

Instantly share code, notes, and snippets.

@ANtlord
Created February 25, 2021 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ANtlord/89adc4e16856a0f779125a4327e332b2 to your computer and use it in GitHub Desktop.
Save ANtlord/89adc4e16856a0f779125a4327e332b2 to your computer and use it in GitHub Desktop.
#######
LanguageClient 0.1.161
#######
11:30:06 DEBUG unnamed src/language_client.rs:108 state: null ==> {"capabilities":{},"code_lens":{},"diagnostics":{},"highlight_match_ids":[],"highlight_source":null,"highlights":{},"highlights_placed":{},"initialization_options":null,"inlay_hints":{},"last_cursor_line":0,"last_line_diagnostic":" ","logger":{"level":"DEBUG","path":"/home/antlord/.local/share/nvim/LanguageClient.log"},"namespace_ids":{},"registrations":[],"roots":{},"semantic_highlights":{},"semantic_scope_to_hl_group_table":{},"semantic_scopes":{},"stashed_code_action_actions":[],"text_documents":{},"text_documents_metadata":{},"user_handlers":{},"viewports":{}}
11:30:06 INFO unnamed src/language_server_protocol.rs:3580 settings synced
11:30:06 INFO unnamed src/language_server_protocol.rs:3607 Project root: /mnt/home/wantlord/develop/study/languageclienttest
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:EchomsgEllipsis","params":["Project root: /mnt/home/wantlord/develop/study/languageclienttest"]}
11:30:06 DEBUG unnamed src/language_client.rs:108 state.roots.rust: null ==> "/mnt/home/wantlord/develop/study/languageclienttest"
11:30:06 INFO unnamed src/language_server_protocol.rs:840 initialize; params=Object({"bufnr": Number(1), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "languageId": String("rust"), "position": Object({"character": Number(0), "line": Number(0)}), "viewport": Object({"end": Number(20), "start": Number(0)})})
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:command","params":["sign define LanguageClientError text=✖ texthl=LanguageClientErrorSign","sign define LanguageClientHint text=➤ texthl=LanguageClientInfoSign","sign define LanguageClientWarning text=⚠ texthl=LanguageClientWarningSign","sign define LanguageClientInformation text=ℹ texthl=LanguageClientInfoSign"]}
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["s:hasSnippetSupport()"],"id":3}
11:30:06 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 3, "jsonrpc": "2.0", "result": 0}
11:30:06 DEBUG writer-Some("rust") src/rpcclient.rs:254 => Some("rust") {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":false},"completion":{"completionItem":{"insertReplaceSupport":false,"snippetSupport":false}},"declaration":{"linkSupport":true},"definition":{"linkSupport":true},"hover":{},"implementation":{"linkSupport":true},"publishDiagnostics":{"relatedInformation":true},"semanticHighlightingCapabilities":{"semanticHighlighting":true},"signatureHelp":{"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}},"typeDefinition":{"linkSupport":true}},"workspace":{"applyEdit":true,"didChangeWatchedFiles":{"dynamicRegistration":true}}},"clientInfo":{"name":"LanguageClient-neovim","version":"0.1.161"},"processId":10928,"rootPath":"/mnt/home/wantlord/develop/study/languageclienttest","rootUri":"file:///mnt/home/wantlord/develop/study/languageclienttest","trace":"off"},"id":0}
11:30:06 DEBUG reader-Some("rust") src/rpcclient.rs:207 <= Some("rust") {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"selectionRangeProvider":true,"hoverProvider":true,"completionProvider":{"triggerCharacters":[":","."]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite"],"resolveProvider":true},"codeLensProvider":{"resolveProvider":true},"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"=","moreTriggerCharacter":[".",">"]},"renameProvider":{"prepareProvider":true},"foldingRangeProvider":true,"workspace":{"fileOperations":{"willRename":{"filters":[{"scheme":"file","pattern":{"glob":"**/*.rs","matches":"file"}},{"scheme":"file","pattern":{"glob":"**","matches":"folder"}}]}}},"callHierarchyProvider":true,"semanticTokensProvider":{"legend":{"tokenTypes":["comment","keyword","string","number","regexp","operator","namespace","type","struct","class","interface","enum","enumMember","typeParameter","function","method","property","macro","variable","parameter","angle","attribute","boolean","brace","bracket","builtinType","characterLiteral","comma","colon","dot","escapeSequence","formatSpecifier","generic","constParameter","lifetime","label","parenthesis","punctuation","selfKeyword","semicolon","typeAlias","union","unresolvedReference"],"tokenModifiers":["documentation","declaration","definition","static","abstract","deprecated","readonly","constant","controlFlow","injected","mutable","consuming","unsafe","attribute","callable"]},"range":true,"full":{"delta":true}},"experimental":{"joinLines":true,"ssr":true,"onEnter":true,"parentModule":true,"runnables":{"kinds":["cargo"]}}},"serverInfo":{"name":"rust-analyzer","version":"14de9e5"}}}
11:30:06 DEBUG unnamed src/language_client.rs:108 state.capabilities.rust: null ==> {"capabilities":{"callHierarchyProvider":true,"codeActionProvider":{"codeActionKinds":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite"],"resolveProvider":true},"codeLensProvider":{"resolveProvider":true},"completionProvider":{"triggerCharacters":[":","."]},"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"=","moreTriggerCharacter":[".",">"]},"documentSymbolProvider":true,"experimental":{"joinLines":true,"onEnter":true,"parentModule":true,"runnables":{"kinds":["cargo"]},"ssr":true},"foldingRangeProvider":true,"hoverProvider":true,"implementationProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["documentation","declaration","definition","static","abstract","deprecated","readonly","constant","controlFlow","injected","mutable","consuming","unsafe","attribute","callable"],"tokenTypes":["comment","keyword","string","number","regexp","operator","namespace","type","struct","class","interface","enum","enumMember","typeParameter","function","method","property","macro","variable","parameter","angle","attribute","boolean","brace","bracket","builtinType","characterLiteral","comma","colon","dot","escapeSequence","formatSpecifier","generic","constParameter","lifetime","label","parenthesis","punctuation","selfKeyword","semicolon","typeAlias","union","unresolvedReference"]},"range":true},"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":{"change":2,"openClose":true,"save":{}},"typeDefinitionProvider":true,"workspace":{},"workspaceSymbolProvider":true},"serverInfo":{"name":"rust-analyzer","version":"14de9e5"}}
11:30:06 INFO unnamed src/language_server_protocol.rs:567 register_cm_source; language_id="rust" result=Object({"capabilities": Object({"callHierarchyProvider": Bool(true), "codeActionProvider": Object({"codeActionKinds": Array([String(""), String("quickfix"), String("refactor"), String("refactor.extract"), String("refactor.inline"), String("refactor.rewrite")]), "resolveProvider": Bool(true)}), "codeLensProvider": Object({"resolveProvider": Bool(true)}), "completionProvider": Object({"triggerCharacters": Array([String(":"), String(".")])}), "definitionProvider": Bool(true), "documentFormattingProvider": Bool(true), "documentHighlightProvider": Bool(true), "documentOnTypeFormattingProvider": Object({"firstTriggerCharacter": String("="), "moreTriggerCharacter": Array([String("."), String(">")])}), "documentSymbolProvider": Bool(true), "experimental": Object({"joinLines": Bool(true), "onEnter": Bool(true), "parentModule": Bool(true), "runnables": Object({"kinds": Array([String("cargo")])}), "ssr": Bool(true)}), "foldingRangeProvider": Bool(true), "hoverProvider": Bool(true), "implementationProvider": Bool(true), "referencesProvider": Bool(true), "renameProvider": Object({"prepareProvider": Bool(true)}), "selectionRangeProvider": Bool(true), "semanticTokensProvider": Object({"full": Object({"delta": Bool(true)}), "legend": Object({"tokenModifiers": Array([String("documentation"), String("declaration"), String("definition"), String("static"), String("abstract"), String("deprecated"), String("readonly"), String("constant"), String("controlFlow"), String("injected"), String("mutable"), String("consuming"), String("unsafe"), String("attribute"), String("callable")]), "tokenTypes": Array([String("comment"), String("keyword"), String("string"), String("number"), String("regexp"), String("operator"), String("namespace"), String("type"), String("struct"), String("class"), String("interface"), String("enum"), String("enumMember"), String("typeParameter"), String("function"), String("method"), String("property"), String("macro"), String("variable"), String("parameter"), String("angle"), String("attribute"), String("boolean"), String("brace"), String("bracket"), String("builtinType"), String("characterLiteral"), String("comma"), String("colon"), String("dot"), String("escapeSequence"), String("formatSpecifier"), String("generic"), String("constParameter"), String("lifetime"), String("label"), String("parenthesis"), String("punctuation"), String("selfKeyword"), String("semicolon"), String("typeAlias"), String("union"), String("unresolvedReference")])}), "range": Bool(true)}), "signatureHelpProvider": Object({"triggerCharacters": Array([String("("), String(",")])}), "textDocumentSync": Object({"change": Number(2), "openClose": Bool(true), "save": Object({})}), "typeDefinitionProvider": Bool(true), "workspace": Object({"fileOperations": Object({"willRename": Object({"filters": Array([Object({"pattern": Object({"glob": String("**/*.rs"), "matches": String("file")}), "scheme": String("file")}), Object({"pattern": Object({"glob": String("**"), "matches": String("folder")}), "scheme": String("file")})])})})}), "workspaceSymbolProvider": Bool(true)}), "serverInfo": Object({"name": String("rust-analyzer"), "version": String("14de9e5")})})
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["exists('g:cm_matcher')"],"id":4}
11:30:06 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 4, "jsonrpc": "2.0", "result": 0}
11:30:06 INFO unnamed src/language_server_protocol.rs:607 register_ncm2_source; language_id="rust" result=Object({"capabilities": Object({"callHierarchyProvider": Bool(true), "codeActionProvider": Object({"codeActionKinds": Array([String(""), String("quickfix"), String("refactor"), String("refactor.extract"), String("refactor.inline"), String("refactor.rewrite")]), "resolveProvider": Bool(true)}), "codeLensProvider": Object({"resolveProvider": Bool(true)}), "completionProvider": Object({"triggerCharacters": Array([String(":"), String(".")])}), "definitionProvider": Bool(true), "documentFormattingProvider": Bool(true), "documentHighlightProvider": Bool(true), "documentOnTypeFormattingProvider": Object({"firstTriggerCharacter": String("="), "moreTriggerCharacter": Array([String("."), String(">")])}), "documentSymbolProvider": Bool(true), "experimental": Object({"joinLines": Bool(true), "onEnter": Bool(true), "parentModule": Bool(true), "runnables": Object({"kinds": Array([String("cargo")])}), "ssr": Bool(true)}), "foldingRangeProvider": Bool(true), "hoverProvider": Bool(true), "implementationProvider": Bool(true), "referencesProvider": Bool(true), "renameProvider": Object({"prepareProvider": Bool(true)}), "selectionRangeProvider": Bool(true), "semanticTokensProvider": Object({"full": Object({"delta": Bool(true)}), "legend": Object({"tokenModifiers": Array([String("documentation"), String("declaration"), String("definition"), String("static"), String("abstract"), String("deprecated"), String("readonly"), String("constant"), String("controlFlow"), String("injected"), String("mutable"), String("consuming"), String("unsafe"), String("attribute"), String("callable")]), "tokenTypes": Array([String("comment"), String("keyword"), String("string"), String("number"), String("regexp"), String("operator"), String("namespace"), String("type"), String("struct"), String("class"), String("interface"), String("enum"), String("enumMember"), String("typeParameter"), String("function"), String("method"), String("property"), String("macro"), String("variable"), String("parameter"), String("angle"), String("attribute"), String("boolean"), String("brace"), String("bracket"), String("builtinType"), String("characterLiteral"), String("comma"), String("colon"), String("dot"), String("escapeSequence"), String("formatSpecifier"), String("generic"), String("constParameter"), String("lifetime"), String("label"), String("parenthesis"), String("punctuation"), String("selfKeyword"), String("semicolon"), String("typeAlias"), String("union"), String("unresolvedReference")])}), "range": Bool(true)}), "signatureHelpProvider": Object({"triggerCharacters": Array([String("("), String(",")])}), "textDocumentSync": Object({"change": Number(2), "openClose": Bool(true), "save": Object({})}), "typeDefinitionProvider": Bool(true), "workspace": Object({"fileOperations": Object({"willRename": Object({"filters": Array([Object({"pattern": Object({"glob": String("**/*.rs"), "matches": String("file")}), "scheme": String("file")}), Object({"pattern": Object({"glob": String("**"), "matches": String("folder")}), "scheme": String("file")})])})})}), "workspaceSymbolProvider": Bool(true)}), "serverInfo": Object({"name": String("rust-analyzer"), "version": String("14de9e5")})})
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["exists('g:ncm2_loaded')"],"id":5}
11:30:06 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 5, "jsonrpc": "2.0", "result": 0}
11:30:06 INFO unnamed src/language_server_protocol.rs:647 parse_semantic_scopes; language_id="rust" result=Object({"capabilities": Object({"callHierarchyProvider": Bool(true), "codeActionProvider": Object({"codeActionKinds": Array([String(""), String("quickfix"), String("refactor"), String("refactor.extract"), String("refactor.inline"), String("refactor.rewrite")]), "resolveProvider": Bool(true)}), "codeLensProvider": Object({"resolveProvider": Bool(true)}), "completionProvider": Object({"triggerCharacters": Array([String(":"), String(".")])}), "definitionProvider": Bool(true), "documentFormattingProvider": Bool(true), "documentHighlightProvider": Bool(true), "documentOnTypeFormattingProvider": Object({"firstTriggerCharacter": String("="), "moreTriggerCharacter": Array([String("."), String(">")])}), "documentSymbolProvider": Bool(true), "experimental": Object({"joinLines": Bool(true), "onEnter": Bool(true), "parentModule": Bool(true), "runnables": Object({"kinds": Array([String("cargo")])}), "ssr": Bool(true)}), "foldingRangeProvider": Bool(true), "hoverProvider": Bool(true), "implementationProvider": Bool(true), "referencesProvider": Bool(true), "renameProvider": Object({"prepareProvider": Bool(true)}), "selectionRangeProvider": Bool(true), "semanticTokensProvider": Object({"full": Object({"delta": Bool(true)}), "legend": Object({"tokenModifiers": Array([String("documentation"), String("declaration"), String("definition"), String("static"), String("abstract"), String("deprecated"), String("readonly"), String("constant"), String("controlFlow"), String("injected"), String("mutable"), String("consuming"), String("unsafe"), String("attribute"), String("callable")]), "tokenTypes": Array([String("comment"), String("keyword"), String("string"), String("number"), String("regexp"), String("operator"), String("namespace"), String("type"), String("struct"), String("class"), String("interface"), String("enum"), String("enumMember"), String("typeParameter"), String("function"), String("method"), String("property"), String("macro"), String("variable"), String("parameter"), String("angle"), String("attribute"), String("boolean"), String("brace"), String("bracket"), String("builtinType"), String("characterLiteral"), String("comma"), String("colon"), String("dot"), String("escapeSequence"), String("formatSpecifier"), String("generic"), String("constParameter"), String("lifetime"), String("label"), String("parenthesis"), String("punctuation"), String("selfKeyword"), String("semicolon"), String("typeAlias"), String("union"), String("unresolvedReference")])}), "range": Bool(true)}), "signatureHelpProvider": Object({"triggerCharacters": Array([String("("), String(",")])}), "textDocumentSync": Object({"change": Number(2), "openClose": Bool(true), "save": Object({})}), "typeDefinitionProvider": Bool(true), "workspace": Object({"fileOperations": Object({"willRename": Object({"filters": Array([Object({"pattern": Object({"glob": String("**/*.rs"), "matches": String("file")}), "scheme": String("file")}), Object({"pattern": Object({"glob": String("**"), "matches": String("folder")}), "scheme": String("file")})])})})}), "workspaceSymbolProvider": Bool(true)}), "serverInfo": Object({"name": String("rust-analyzer"), "version": String("14de9e5")})})
11:30:06 INFO unnamed src/language_server_protocol.rs:1019 initialized; params=Object({"bufnr": Number(1), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "languageId": String("rust"), "position": Object({"character": Number(0), "line": Number(0)}), "viewport": Object({"end": Number(20), "start": Number(0)})})
11:30:06 INFO unnamed src/language_server_protocol.rs:666 update_semantic_highlight_tables; language_id="rust"
11:30:06 DEBUG writer-Some("rust") src/rpcclient.rs:254 => Some("rust") {"jsonrpc":"2.0","method":"initialized","params":{}}
11:30:06 WARN unnamed src/language_server_protocol.rs:3707 Failed to get workspace settings: Failed to read file (/mnt/home/wantlord/develop/study/languageclienttest/.vim/settings.json)
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setbufvar","params":["/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","LanguageClient_isServerRunning",1]}
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:ExecuteAutocmd","params":["LanguageClientStarted"]}
11:30:06 INFO unnamed src/language_server_protocol.rs:1946 text_document_did_open; params=Object({"bufnr": Number(1), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "languageId": String("rust"), "position": Object({"character": Number(0), "line": Number(0)}), "viewport": Object({"end": Number(20), "start": Number(0)})})
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"LSP#text","params":["/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"],"id":6}
11:30:06 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 6, "jsonrpc": "2.0", "result": ["use std::{env::args, fs, ptr, slice};", "use std::os::unix::io::AsRawFd;", "", "// First argument is a binary that should be parsed by the `object` library.", "fn main() -> Result<(), Box<dyn std::error::Error>> {", " let program_name = args().skip(1).next().ok_or(\"Executable is not designated\")?;", " let fd = fs::File::open(&program_name).map_err(|e| format!(\"fail openning executable file: {}\", e))?;", " let size = fd.metadata().map_err(|e| format!(\"fail getting metadata: {}\", e))?.len() as usize;", " let data: &[u8] = unsafe {", " let res = libc::mmap(ptr::null_mut(), size, libc::PROT_READ, libc::MAP_PRIVATE, fd.as_raw_fd(), 0);", " if libc::MAP_FAILED == res {", " panic!(\"failed mmap\");", " }", "", " slice::from_raw_parts(res as *const _, size)", " };", "", " object::File::parse(&data).map_err(|e| format!(\"fail building an object file: {}\", e))?;", " Ok(())", "}", ""]}
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["s:GetVar('LanguageClient_setOmnifunc', v:true)"],"id":7}
11:30:06 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 7, "jsonrpc": "2.0", "result": true}
11:30:06 DEBUG unnamed src/language_client.rs:108 state.text_documents./mnt/home/wantlord/develop/study/languageclienttest/src/main.rs: null ==> {"languageId":"rust","text":"use std::{env::args, fs, ptr, slice};\nuse std::os::unix::io::AsRawFd;\n\n// First argument is a binary that should be parsed by the `object` library.\nfn main() -> Result<(), Box<dyn std::error::Error>> {\n let program_name = args().skip(1).next().ok_or(\"Executable is not designated\")?;\n let fd = fs::File::open(&program_name).map_err(|e| format!(\"fail openning executable file: {}\", e))?;\n let size = fd.metadata().map_err(|e| format!(\"fail getting metadata: {}\", e))?.len() as usize;\n let data: &[u8] = unsafe {\n let res = libc::mmap(ptr::null_mut(), size, libc::PROT_READ, libc::MAP_PRIVATE, fd.as_raw_fd(), 0);\n if libc::MAP_FAILED == res {\n panic!(\"failed mmap\");\n }\n\n slice::from_raw_parts(res as *const _, size)\n };\n\n object::File::parse(&data).map_err(|e| format!(\"fail building an object file: {}\", e))?;\n Ok(())\n}\n","uri":"file:///mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","version":0}
11:30:06 INFO unnamed src/language_server_protocol.rs:1888 text_document_code_lens; params=Object({"bufnr": Number(1), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "languageId": String("rust"), "position": Object({"character": Number(0), "line": Number(0)}), "viewport": Object({"end": Number(20), "start": Number(0)})})
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:command","params":["setlocal omnifunc=LanguageClient#complete"]}
11:30:06 DEBUG writer-Some("rust") src/rpcclient.rs:254 => Some("rust") {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"rust","text":"use std::{env::args, fs, ptr, slice};\nuse std::os::unix::io::AsRawFd;\n\n// First argument is a binary that should be parsed by the `object` library.\nfn main() -> Result<(), Box<dyn std::error::Error>> {\n let program_name = args().skip(1).next().ok_or(\"Executable is not designated\")?;\n let fd = fs::File::open(&program_name).map_err(|e| format!(\"fail openning executable file: {}\", e))?;\n let size = fd.metadata().map_err(|e| format!(\"fail getting metadata: {}\", e))?.len() as usize;\n let data: &[u8] = unsafe {\n let res = libc::mmap(ptr::null_mut(), size, libc::PROT_READ, libc::MAP_PRIVATE, fd.as_raw_fd(), 0);\n if libc::MAP_FAILED == res {\n panic!(\"failed mmap\");\n }\n\n slice::from_raw_parts(res as *const _, size)\n };\n\n object::File::parse(&data).map_err(|e| format!(\"fail building an object file: {}\", e))?;\n Ok(())\n}\n","uri":"file:///mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","version":0}}}
11:30:06 DEBUG unnamed src/language_client.rs:108 state.inlay_hints./mnt/home/wantlord/develop/study/languageclienttest/src/main.rs: null ==> []
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setbufvar","params":["/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","LanguageClient_projectRoot","/mnt/home/wantlord/develop/study/languageclienttest"]}
11:30:06 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:ExecuteAutocmd","params":["LanguageClientTextDocumentDidOpenPost"]}
11:30:06 DEBUG reader-None src/rpcclient.rs:207 <= None {"method": "languageClient/handleCursorMoved", "jsonrpc": "2.0", "params": {"bufnr": 1, "viewport": {"end": 20, "start": 0}, "languageId": "rust", "buftype": "", "position": {"character": 0, "line": 0}, "filename": "/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"}}
11:30:06 INFO unnamed src/language_server_protocol.rs:2873 handle_cursor_moved; params=Object({"bufnr": Number(1), "buftype": String(""), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "languageId": String("rust"), "position": Object({"character": Number(0), "line": Number(0)}), "viewport": Object({"end": Number(20), "start": Number(0)})}) force_redraw=false
11:30:06 DEBUG reader-Some("rust") src/rpcclient.rs:207 <= Some("rust") {"jsonrpc":"2.0","id":0,"method":"client/registerCapability","params":{"registrations":[{"id":"workspace/didChangeWatchedFiles","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"/mnt/home/wantlord/develop/study/languageclienttest/**/*.rs"}]}}]}}
11:30:06 INFO unnamed src/language_server_protocol.rs:2489 client_register_capability; language_id="rust" params=Object({"registrations": Array([Object({"id": String("workspace/didChangeWatchedFiles"), "method": String("workspace/didChangeWatchedFiles"), "registerOptions": Object({"watchers": Array([Object({"globPattern": String("/mnt/home/wantlord/develop/study/languageclienttest/**/*.rs")})])})})])})
11:30:06 INFO unnamed src/language_server_protocol.rs:2512 Watching glob pattern: /mnt/home/wantlord/develop/study/languageclienttest/**/*.rs
11:30:06 INFO unnamed src/language_server_protocol.rs:2524 Start watching path "/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"
11:30:06 DEBUG unnamed src/language_client.rs:108 state.registrations: [] ==> [{"id":"workspace/didChangeWatchedFiles","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"/mnt/home/wantlord/develop/study/languageclienttest/**/*.rs"}]}}]
11:30:06 DEBUG writer-Some("rust") src/rpcclient.rs:254 => Some("rust") {"jsonrpc":"2.0","result":null,"id":0}
11:30:10 DEBUG reader-Some("rust") src/rpcclient.rs:207 <= Some("rust") {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","diagnostics":[{"range":{"start":{"line":1,"character":4},"end":{"line":1,"character":30}},"severity":1,"code":"unresolved-import","codeDescription":{"href":"https://rust-analyzer.github.io/manual.html#unresolved-import"},"source":"rust-analyzer","message":"unresolved import"}],"version":0}}
11:30:10 INFO unnamed src/language_server_protocol.rs:2095 text_document_publish_diagnostics; params=Object({"diagnostics": Array([Object({"code": String("unresolved-import"), "codeDescription": Object({"href": String("https://rust-analyzer.github.io/manual.html#unresolved-import")}), "message": String("unresolved import"), "range": Object({"end": Object({"character": Number(30), "line": Number(1)}), "start": Object({"character": Number(4), "line": Number(1)})}), "severity": Number(1), "source": String("rust-analyzer")})]), "uri": String("file:///mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "version": Number(0)})
11:30:10 DEBUG unnamed src/language_client.rs:108 state.diagnostics./mnt/home/wantlord/develop/study/languageclienttest/src/main.rs: null ==> [{"code":"unresolved-import","codeDescription":{"href":"https://rust-analyzer.github.io/manual.html#unresolved-import"},"message":"unresolved import","range":{"end":{"character":30,"line":1},"start":{"character":4,"line":1}},"severity":1,"source":"rust-analyzer"}]
11:30:10 INFO unnamed src/vim.rs:225 Begin setqflist
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setqflist","params":[[{"col":5,"filename":"/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","lnum":2,"nr":"unresolved-import","text":"unresolved import","type":"E"}],"r"]}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setqflist","params":[[],"a",{"title":"[LC]: diagnostics"}]}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["bufnr('/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs')"],"id":8}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 8, "jsonrpc": "2.0", "result": 1}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setbufvar","params":["/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","LanguageClient_statusLineDiagnosticsCounts",{"E":1,"H":0,"I":0,"W":0}]}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#filename()"],"id":9}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 9, "jsonrpc": "2.0", "result": "/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"}
11:30:10 DEBUG unnamed src/language_client.rs:108 state.highlights./mnt/home/wantlord/develop/study/languageclienttest/src/main.rs: null ==> [{"character_end":30,"character_start":4,"group":"LanguageClientError","line":1,"text":"std::os::unix::io::AsRawFd"}]
11:30:10 INFO unnamed src/language_server_protocol.rs:2873 handle_cursor_moved; params=Null force_redraw=true
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#filename()"],"id":10}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 10, "jsonrpc": "2.0", "result": "/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"getbufvar","params":["/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","&filetype"],"id":11}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 11, "jsonrpc": "2.0", "result": "rust"}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#position()"],"id":12}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 12, "jsonrpc": "2.0", "result": {"character": 0, "line": 0}}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#viewport()"],"id":13}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 13, "jsonrpc": "2.0", "result": {"end": 20, "start": 0}}
11:30:10 INFO unnamed src/language_server_protocol.rs:2847 get_signs_to_display; filename="/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs" viewport=Viewport { start: 0, end: 20 }
11:30:10 DEBUG unnamed src/language_client.rs:108 state.viewports./mnt/home/wantlord/develop/study/languageclienttest/src/main.rs: null ==> {"end":20,"start":0}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:set_signs","params":["/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs",[{"id":75005,"line":1,"name":"LanguageClientError"}]],"id":14}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 14, "jsonrpc": "2.0", "result": 0}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:SetHighlights","params":[[{"character_end":30,"character_start":4,"group":"LanguageClientError","line":1,"text":"std::os::unix::io::AsRawFd"}],"__LCN_DIAGNOSTIC_HIGHLIGHT__"]}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#filename()"],"id":15}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 15, "jsonrpc": "2.0", "result": "/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#viewport()"],"id":16}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 16, "jsonrpc": "2.0", "result": {"end": 20, "start": 0}}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["bufnr('/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs')"],"id":17}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 17, "jsonrpc": "2.0", "result": 1}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"nvim_create_namespace","params":["LanguageClient_VirtualText"],"id":18}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 18, "jsonrpc": "2.0", "result": 2}
11:30:10 DEBUG unnamed src/language_client.rs:108 state.namespace_ids.LanguageClient_VirtualText: null ==> 2
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"mode","params":[],"id":19}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 19, "jsonrpc": "2.0", "result": "n"}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:set_virtual_texts","params":[1,2,0,20,[]],"id":20}
11:30:10 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 20, "jsonrpc": "2.0", "result": 0}
11:30:10 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:ExecuteAutocmd","params":["LanguageClientDiagnosticsChanged"]}
11:30:15 DEBUG reader-None src/rpcclient.rs:207 <= None {"method": "languageClient/handleCursorMoved", "jsonrpc": "2.0", "params": {"bufnr": 1, "viewport": {"end": 20, "start": 0}, "languageId": "rust", "buftype": "", "position": {"character": 45, "line": 3}, "filename": "/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"}}
11:30:15 INFO unnamed src/language_server_protocol.rs:2873 handle_cursor_moved; params=Object({"bufnr": Number(1), "buftype": String(""), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "languageId": String("rust"), "position": Object({"character": Number(45), "line": Number(3)}), "viewport": Object({"end": Number(20), "start": Number(0)})}) force_redraw=false
11:30:15 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:EchoEllipsis","params":[""]}
11:30:15 DEBUG unnamed src/language_client.rs:108 state.last_line_diagnostic: " " ==> ""
11:30:15 DEBUG unnamed src/language_client.rs:108 state.last_cursor_line: 0 ==> 3
11:30:16 DEBUG reader-None src/rpcclient.rs:207 <= None {"method": "languageClient/handleCursorMoved", "jsonrpc": "2.0", "params": {"bufnr": 1, "viewport": {"end": 20, "start": 0}, "languageId": "rust", "buftype": "", "position": {"character": 19, "line": 17}, "filename": "/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"}}
11:30:16 INFO unnamed src/language_server_protocol.rs:2873 handle_cursor_moved; params=Object({"bufnr": Number(1), "buftype": String(""), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "languageId": String("rust"), "position": Object({"character": Number(19), "line": Number(17)}), "viewport": Object({"end": Number(20), "start": Number(0)})}) force_redraw=false
11:30:16 DEBUG unnamed src/language_client.rs:108 state.last_cursor_line: 3 ==> 17
11:30:17 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 1, "jsonrpc": "2.0", "method": "textDocument/definition", "params": {"bufnr": 1, "character": 19, "handle": true, "languageId": "rust", "gotoCmd": null, "line": 17, "text": ["use std::{env::args, fs, ptr, slice};", "use std::os::unix::io::AsRawFd;", "", "// First argument is a binary that should be parsed by the `object` library.", "fn main() -> Result<(), Box<dyn std::error::Error>> {", " let program_name = args().skip(1).next().ok_or(\"Executable is not designated\")?;", " let fd = fs::File::open(&program_name).map_err(|e| format!(\"fail openning executable file: {}\", e))?;", " let size = fd.metadata().map_err(|e| format!(\"fail getting metadata: {}\", e))?.len() as usize;", " let data: &[u8] = unsafe {", " let res = libc::mmap(ptr::null_mut(), size, libc::PROT_READ, libc::MAP_PRIVATE, fd.as_raw_fd(), 0);", " if libc::MAP_FAILED == res {", " panic!(\"failed mmap\");", " }", "", " slice::from_raw_parts(res as *const _, size)", " };", "", " object::File::parse(&data).map_err(|e| format!(\"fail building an object file: {}\", e))?;", " Ok(())", "}", ""], "filename": "/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"}}
11:30:17 INFO unnamed src/language_server_protocol.rs:1473 text_document_definition; params=Object({"bufnr": Number(1), "character": Number(19), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "gotoCmd": Null, "handle": Bool(true), "languageId": String("rust"), "line": Number(17), "text": Array([String("use std::{env::args, fs, ptr, slice};"), String("use std::os::unix::io::AsRawFd;"), String(""), String("// First argument is a binary that should be parsed by the `object` library."), String("fn main() -> Result<(), Box<dyn std::error::Error>> {"), String(" let program_name = args().skip(1).next().ok_or(\"Executable is not designated\")?;"), String(" let fd = fs::File::open(&program_name).map_err(|e| format!(\"fail openning executable file: {}\", e))?;"), String(" let size = fd.metadata().map_err(|e| format!(\"fail getting metadata: {}\", e))?.len() as usize;"), String(" let data: &[u8] = unsafe {"), String(" let res = libc::mmap(ptr::null_mut(), size, libc::PROT_READ, libc::MAP_PRIVATE, fd.as_raw_fd(), 0);"), String(" if libc::MAP_FAILED == res {"), String(" panic!(\"failed mmap\");"), String(" }"), String(""), String(" slice::from_raw_parts(res as *const _, size)"), String(" };"), String(""), String(" object::File::parse(&data).map_err(|e| format!(\"fail building an object file: {}\", e))?;"), String(" Ok(())"), String("}"), String("")])})
11:30:17 INFO unnamed src/language_server_protocol.rs:1077 find_locations; params=Object({"bufnr": Number(1), "character": Number(19), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "gotoCmd": Null, "handle": Bool(true), "languageId": String("rust"), "line": Number(17), "method": String("textDocument/definition"), "text": Array([String("use std::{env::args, fs, ptr, slice};"), String("use std::os::unix::io::AsRawFd;"), String(""), String("// First argument is a binary that should be parsed by the `object` library."), String("fn main() -> Result<(), Box<dyn std::error::Error>> {"), String(" let program_name = args().skip(1).next().ok_or(\"Executable is not designated\")?;"), String(" let fd = fs::File::open(&program_name).map_err(|e| format!(\"fail openning executable file: {}\", e))?;"), String(" let size = fd.metadata().map_err(|e| format!(\"fail getting metadata: {}\", e))?.len() as usize;"), String(" let data: &[u8] = unsafe {"), String(" let res = libc::mmap(ptr::null_mut(), size, libc::PROT_READ, libc::MAP_PRIVATE, fd.as_raw_fd(), 0);"), String(" if libc::MAP_FAILED == res {"), String(" panic!(\"failed mmap\");"), String(" }"), String(""), String(" slice::from_raw_parts(res as *const _, size)"), String(" };"), String(""), String(" object::File::parse(&data).map_err(|e| format!(\"fail building an object file: {}\", e))?;"), String(" Ok(())"), String("}"), String("")])})
11:30:17 INFO unnamed src/language_server_protocol.rs:1993 text_document_did_change; params=Object({"bufnr": Number(1), "character": Number(19), "filename": String("/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"), "gotoCmd": Null, "handle": Bool(true), "languageId": String("rust"), "line": Number(17), "method": String("textDocument/definition"), "text": Array([String("use std::{env::args, fs, ptr, slice};"), String("use std::os::unix::io::AsRawFd;"), String(""), String("// First argument is a binary that should be parsed by the `object` library."), String("fn main() -> Result<(), Box<dyn std::error::Error>> {"), String(" let program_name = args().skip(1).next().ok_or(\"Executable is not designated\")?;"), String(" let fd = fs::File::open(&program_name).map_err(|e| format!(\"fail openning executable file: {}\", e))?;"), String(" let size = fd.metadata().map_err(|e| format!(\"fail getting metadata: {}\", e))?.len() as usize;"), String(" let data: &[u8] = unsafe {"), String(" let res = libc::mmap(ptr::null_mut(), size, libc::PROT_READ, libc::MAP_PRIVATE, fd.as_raw_fd(), 0);"), String(" if libc::MAP_FAILED == res {"), String(" panic!(\"failed mmap\");"), String(" }"), String(""), String(" slice::from_raw_parts(res as *const _, size)"), String(" };"), String(""), String(" object::File::parse(&data).map_err(|e| format!(\"fail building an object file: {}\", e))?;"), String(" Ok(())"), String("}"), String("")])})
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"LSP#text","params":["/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"],"id":21}
11:30:17 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 21, "jsonrpc": "2.0", "result": ["use std::{env::args, fs, ptr, slice};", "use std::os::unix::io::AsRawFd;", "", "// First argument is a binary that should be parsed by the `object` library.", "fn main() -> Result<(), Box<dyn std::error::Error>> {", " let program_name = args().skip(1).next().ok_or(\"Executable is not designated\")?;", " let fd = fs::File::open(&program_name).map_err(|e| format!(\"fail openning executable file: {}\", e))?;", " let size = fd.metadata().map_err(|e| format!(\"fail getting metadata: {}\", e))?.len() as usize;", " let data: &[u8] = unsafe {", " let res = libc::mmap(ptr::null_mut(), size, libc::PROT_READ, libc::MAP_PRIVATE, fd.as_raw_fd(), 0);", " if libc::MAP_FAILED == res {", " panic!(\"failed mmap\");", " }", "", " slice::from_raw_parts(res as *const _, size)", " };", "", " object::File::parse(&data).map_err(|e| format!(\"fail building an object file: {}\", e))?;", " Ok(())", "}", ""]}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#position()"],"id":22}
11:30:17 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 22, "jsonrpc": "2.0", "result": {"character": 19, "line": 17}}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["expand('<cword>')"],"id":23}
11:30:17 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 23, "jsonrpc": "2.0", "result": "parse"}
11:30:17 DEBUG writer-Some("rust") src/rpcclient.rs:254 => Some("rust") {"jsonrpc":"2.0","method":"textDocument/definition","params":{"bufnr":1,"character":19,"filename":"/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","gotoCmd":null,"handle":true,"languageId":"rust","line":17,"method":"textDocument/definition","position":{"character":19,"line":17},"text":["use std::{env::args, fs, ptr, slice};","use std::os::unix::io::AsRawFd;","","// First argument is a binary that should be parsed by the `object` library.","fn main() -> Result<(), Box<dyn std::error::Error>> {"," let program_name = args().skip(1).next().ok_or(\"Executable is not designated\")?;"," let fd = fs::File::open(&program_name).map_err(|e| format!(\"fail openning executable file: {}\", e))?;"," let size = fd.metadata().map_err(|e| format!(\"fail getting metadata: {}\", e))?.len() as usize;"," let data: &[u8] = unsafe {"," let res = libc::mmap(ptr::null_mut(), size, libc::PROT_READ, libc::MAP_PRIVATE, fd.as_raw_fd(), 0);"," if libc::MAP_FAILED == res {"," panic!(\"failed mmap\");"," }",""," slice::from_raw_parts(res as *const _, size)"," };",""," object::File::parse(&data).map_err(|e| format!(\"fail building an object file: {}\", e))?;"," Ok(())","}",""],"textDocument":{"uri":"file:///mnt/home/wantlord/develop/study/languageclienttest/src/main.rs"}},"id":1}
11:30:17 DEBUG reader-Some("rust") src/rpcclient.rs:207 <= Some("rust") {"jsonrpc":"2.0","id":1,"result":[{"originSelectionRange":{"start":{"line":17,"character":19},"end":{"line":17,"character":24}},"targetUri":"file:///home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs","targetRange":{"start":{"line":172,"character":4},"end":{"line":194,"character":5}},"targetSelectionRange":{"start":{"line":173,"character":11},"end":{"line":173,"character":16}}}]}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:Edit","params":["edit","/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"]}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"cursor","params":[174,12]}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["expand('%')"],"id":24}
11:30:17 DEBUG reader-None src/rpcclient.rs:207 <= None {"method": "languageClient/handleFileType", "jsonrpc": "2.0", "params": {"bufnr": 2, "viewport": {"end": 67, "start": 0}, "languageId": "rust", "position": {"character": 0, "line": 0}, "filename": "/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}}
11:30:17 INFO unnamed src/language_server_protocol.rs:2760 handle_file_type; params=Object({"bufnr": Number(2), "filename": String("/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "languageId": String("rust"), "position": Object({"character": Number(0), "line": Number(0)}), "viewport": Object({"end": Number(67), "start": Number(0)})})
11:30:17 INFO unnamed src/language_server_protocol.rs:1946 text_document_did_open; params=Object({"bufnr": Number(2), "filename": String("/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "languageId": String("rust"), "position": Object({"character": Number(0), "line": Number(0)}), "viewport": Object({"end": Number(67), "start": Number(0)})})
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"LSP#text","params":["/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"],"id":25}
11:30:17 DEBUG reader-None src/rpcclient.rs:207 <= None {"method": "languageClient/handleBufEnter", "jsonrpc": "2.0", "params": {"bufnr": 2, "languageId": "rust", "filename": "/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}}
11:30:17 INFO unnamed src/language_server_protocol.rs:2739 handle_buf_enter; params=Object({"bufnr": Number(2), "filename": String("/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "languageId": String("rust")})
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setbufvar","params":["/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs","LanguageClient_isServerRunning",1]}
11:30:17 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 24, "jsonrpc": "2.0", "result": "/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:EchomsgEllipsis","params":["/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs 174:12"]}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","result":[{"originSelectionRange":{"end":{"character":24,"line":17},"start":{"character":19,"line":17}},"targetRange":{"end":{"character":5,"line":194},"start":{"character":4,"line":172}},"targetSelectionRange":{"end":{"character":16,"line":173},"start":{"character":11,"line":173}},"targetUri":"file:///home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}],"id":1}
11:30:17 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 25, "jsonrpc": "2.0", "result": ["use alloc::fmt;", "use alloc::vec::Vec;", "use core::marker::PhantomData;", "", "#[cfg(feature = \"coff\")]", "use crate::read::coff;", "#[cfg(feature = \"elf\")]", "use crate::read::elf;", "#[cfg(feature = \"macho\")]", "use crate::read::macho;", "#[cfg(feature = \"pe\")]", "use crate::read::pe;", "#[cfg(feature = \"wasm\")]", "use crate::read::wasm;", "use crate::read::{", " self, Architecture, BinaryFormat, ComdatKind, CompressedData, Error, Export, FileFlags,", " FileKind, Import, Object, ObjectComdat, ObjectMap, ObjectSection, ObjectSegment, ObjectSymbol,", " ObjectSymbolTable, Relocation, Result, SectionFlags, SectionIndex, SectionKind, SymbolFlags,", " SymbolIndex, SymbolKind, SymbolMap, SymbolMapName, SymbolScope, SymbolSection,", "};", "", "/// Evaluate an expression on the contents of a file format enum.", "///", "/// This is a hack to avoid virtual calls.", "macro_rules! with_inner {", " ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $enum::Coff(ref $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf32(ref $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf64(ref $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO32(ref $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO64(ref $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe32(ref $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe64(ref $var) => $body,", " #[cfg(feature = \"wasm\")]", " $enum::Wasm(ref $var) => $body,", " }", " };", "}", "", "macro_rules! with_inner_mut {", " ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $enum::Coff(ref mut $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf32(ref mut $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf64(ref mut $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO32(ref mut $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO64(ref mut $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe32(ref mut $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe64(ref mut $var) => $body,", " #[cfg(feature = \"wasm\")]", " $enum::Wasm(ref mut $var) => $body,", " }", " };", "}", "", "/// Like `with_inner!`, but wraps the result in another enum.", "macro_rules! map_inner {", " ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $from::Coff(ref $var) => $to::Coff($body),", " #[cfg(feature = \"elf\")]", " $from::Elf32(ref $var) => $to::Elf32($body),", " #[cfg(feature = \"elf\")]", " $from::Elf64(ref $var) => $to::Elf64($body),", " #[cfg(feature = \"macho\")]", " $from::MachO32(ref $var) => $to::MachO32($body),", " #[cfg(feature = \"macho\")]", " $from::MachO64(ref $var) => $to::MachO64($body),", " #[cfg(feature = \"pe\")]", " $from::Pe32(ref $var) => $to::Pe32($body),", " #[cfg(feature = \"pe\")]", " $from::Pe64(ref $var) => $to::Pe64($body),", " #[cfg(feature = \"wasm\")]", " $from::Wasm(ref $var) => $to::Wasm($body),", " }", " };", "}", "", "/// Like `map_inner!`, but the result is a Result or Option.", "macro_rules! map_inner_option {", " ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $from::Coff(ref $var) => $body.map($to::Coff),", " #[cfg(feature = \"elf\")]", " $from::Elf32(ref $var) => $body.map($to::Elf32),", " #[cfg(feature = \"elf\")]", " $from::Elf64(ref $var) => $body.map($to::Elf64),", " #[cfg(feature = \"macho\")]", " $from::MachO32(ref $var) => $body.map($to::MachO32),", " #[cfg(feature = \"macho\")]", " $from::MachO64(ref $var) => $body.map($to::MachO64),", " #[cfg(feature = \"pe\")]", " $from::Pe32(ref $var) => $body.map($to::Pe32),", " #[cfg(feature = \"pe\")]", " $from::Pe64(ref $var) => $body.map($to::Pe64),", " #[cfg(feature = \"wasm\")]", " $from::Wasm(ref $var) => $body.map($to::Wasm),", " }", " };", "}", "", "/// Call `next` for a file format iterator.", "macro_rules! next_inner {", " ($inner:expr, $from:ident, $to:ident) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $from::Coff(ref mut iter) => iter.next().map($to::Coff),", " #[cfg(feature = \"elf\")]", " $from::Elf32(ref mut iter) => iter.next().map($to::Elf32),", " #[cfg(feature = \"elf\")]", " $from::Elf64(ref mut iter) => iter.next().map($to::Elf64),", " #[cfg(feature = \"macho\")]", " $from::MachO32(ref mut iter) => iter.next().map($to::MachO32),", " #[cfg(feature = \"macho\")]", " $from::MachO64(ref mut iter) => iter.next().map($to::MachO64),", " #[cfg(feature = \"pe\")]", " $from::Pe32(ref mut iter) => iter.next().map($to::Pe32),", " #[cfg(feature = \"pe\")]", " $from::Pe64(ref mut iter) => iter.next().map($to::Pe64),", " #[cfg(feature = \"wasm\")]", " $from::Wasm(ref mut iter) => iter.next().map($to::Wasm),", " }", " };", "}", "", "/// An object file.", "///", "/// Most functionality is provided by the `Object` trait implementation.", "#[derive(Debug)]", "pub struct File<'data> {", " inner: FileInternal<'data>,", "}", "", "#[allow(clippy::large_enum_variant)]", "#[derive(Debug)]", "enum FileInternal<'data> {", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffFile<'data>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfFile32<'data>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfFile64<'data>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOFile32<'data>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOFile64<'data>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeFile32<'data>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeFile64<'data>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmFile<'data>),", "}", "", "impl<'data> File<'data> {", " /// Parse the raw file data.", " pub fn parse(data: &'data [u8]) -> Result<Self> {", " let inner = match FileKind::parse(data)? {", " #[cfg(feature = \"elf\")]", " FileKind::Elf32 => FileInternal::Elf32(elf::ElfFile32::parse(data)?),", " #[cfg(feature = \"elf\")]", " FileKind::Elf64 => FileInternal::Elf64(elf::ElfFile64::parse(data)?),", " #[cfg(feature = \"macho\")]", " FileKind::MachO32 => FileInternal::MachO32(macho::MachOFile32::parse(data)?),", " #[cfg(feature = \"macho\")]", " FileKind::MachO64 => FileInternal::MachO64(macho::MachOFile64::parse(data)?),", " #[cfg(feature = \"wasm\")]", " FileKind::Wasm => FileInternal::Wasm(wasm::WasmFile::parse(data)?),", " #[cfg(feature = \"pe\")]", " FileKind::Pe32 => FileInternal::Pe32(pe::PeFile32::parse(data)?),", " #[cfg(feature = \"pe\")]", " FileKind::Pe64 => FileInternal::Pe64(pe::PeFile64::parse(data)?),", " #[cfg(feature = \"coff\")]", " FileKind::Coff => FileInternal::Coff(coff::CoffFile::parse(data)?),", " _ => return Err(Error(\"Unsupported file format\")),", " };", " Ok(File { inner })", " }", "", " /// Return the file format.", " pub fn format(&self) -> BinaryFormat {", " match self.inner {", " #[cfg(feature = \"coff\")]", " FileInternal::Coff(_) => BinaryFormat::Coff,", " #[cfg(feature = \"elf\")]", " FileInternal::Elf32(_) | FileInternal::Elf64(_) => BinaryFormat::Elf,", " #[cfg(feature = \"macho\")]", " FileInternal::MachO32(_) | FileInternal::MachO64(_) => BinaryFormat::MachO,", " #[cfg(feature = \"pe\")]", " FileInternal::Pe32(_) | FileInternal::Pe64(_) => BinaryFormat::Pe,", " #[cfg(feature = \"wasm\")]", " FileInternal::Wasm(_) => BinaryFormat::Wasm,", " }", " }", "}", "", "impl<'data> read::private::Sealed for File<'data> {}", "", "impl<'data, 'file> Object<'data, 'file> for File<'data>", "where", " 'data: 'file,", "{", " type Segment = Segment<'data, 'file>;", " type SegmentIterator = SegmentIterator<'data, 'file>;", " type Section = Section<'data, 'file>;", " type SectionIterator = SectionIterator<'data, 'file>;", " type Comdat = Comdat<'data, 'file>;", " type ComdatIterator = ComdatIterator<'data, 'file>;", " type Symbol = Symbol<'data, 'file>;", " type SymbolIterator = SymbolIterator<'data, 'file>;", " type SymbolTable = SymbolTable<'data, 'file>;", " type DynamicRelocationIterator = DynamicRelocationIterator<'data, 'file>;", "", " fn architecture(&self) -> Architecture {", " with_inner!(self.inner, FileInternal, |x| x.architecture())", " }", "", " fn is_little_endian(&self) -> bool {", " with_inner!(self.inner, FileInternal, |x| x.is_little_endian())", " }", "", " fn is_64(&self) -> bool {", " with_inner!(self.inner, FileInternal, |x| x.is_64())", " }", "", " fn segments(&'file self) -> SegmentIterator<'data, 'file> {", " SegmentIterator {", " inner: map_inner!(self.inner, FileInternal, SegmentIteratorInternal, |x| x", " .segments()),", " }", " }", "", " fn section_by_name(&'file self, section_name: &str) -> Option<Section<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x", " .section_by_name(section_name))", " .map(|inner| Section { inner })", " }", "", " fn section_by_index(&'file self, index: SectionIndex) -> Result<Section<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x", " .section_by_index(index))", " .map(|inner| Section { inner })", " }", "", " fn sections(&'file self) -> SectionIterator<'data, 'file> {", " SectionIterator {", " inner: map_inner!(self.inner, FileInternal, SectionIteratorInternal, |x| x", " .sections()),", " }", " }", "", " fn comdats(&'file self) -> ComdatIterator<'data, 'file> {", " ComdatIterator {", " inner: map_inner!(self.inner, FileInternal, ComdatIteratorInternal, |x| x", " .comdats()),", " }", " }", "", " fn symbol_by_index(&'file self, index: SymbolIndex) -> Result<Symbol<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SymbolInternal, |x| x", " .symbol_by_index(index))", " .map(|inner| Symbol { inner })", " }", "", " fn symbols(&'file self) -> SymbolIterator<'data, 'file> {", " SymbolIterator {", " inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x", " .symbols()),", " }", " }", "", " fn symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x", " .symbol_table())", " .map(|inner| SymbolTable { inner })", " }", "", " fn dynamic_symbols(&'file self) -> SymbolIterator<'data, 'file> {", " SymbolIterator {", " inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x", " .dynamic_symbols()),", " }", " }", "", " fn dynamic_symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x", " .dynamic_symbol_table())", " .map(|inner| SymbolTable { inner })", " }", "", " #[cfg(feature = \"elf\")]", " fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {", " let inner = match self.inner {", " FileInternal::Elf32(ref elf) => {", " DynamicRelocationIteratorInternal::Elf32(elf.dynamic_relocations()?)", " }", " FileInternal::Elf64(ref elf) => {", " DynamicRelocationIteratorInternal::Elf64(elf.dynamic_relocations()?)", " }", " _ => return None,", " };", " Some(DynamicRelocationIterator { inner })", " }", "", " #[cfg(not(feature = \"elf\"))]", " fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {", " None", " }", "", " fn symbol_map(&self) -> SymbolMap<SymbolMapName<'data>> {", " with_inner!(self.inner, FileInternal, |x| x.symbol_map())", " }", "", " fn object_map(&self) -> ObjectMap<'data> {", " with_inner!(self.inner, FileInternal, |x| x.object_map())", " }", "", " fn imports(&self) -> Result<Vec<Import<'data>>> {", " with_inner!(self.inner, FileInternal, |x| x.imports())", " }", "", " fn exports(&self) -> Result<Vec<Export<'data>>> {", " with_inner!(self.inner, FileInternal, |x| x.exports())", " }", "", " fn has_debug_symbols(&self) -> bool {", " with_inner!(self.inner, FileInternal, |x| x.has_debug_symbols())", " }", "", " #[inline]", " fn mach_uuid(&self) -> Result<Option<[u8; 16]>> {", " with_inner!(self.inner, FileInternal, |x| x.mach_uuid())", " }", "", " #[inline]", " fn build_id(&self) -> Result<Option<&'data [u8]>> {", " with_inner!(self.inner, FileInternal, |x| x.build_id())", " }", "", " #[inline]", " fn gnu_debuglink(&self) -> Result<Option<(&'data [u8], u32)>> {", " with_inner!(self.inner, FileInternal, |x| x.gnu_debuglink())", " }", "", " fn entry(&self) -> u64 {", " with_inner!(self.inner, FileInternal, |x| x.entry())", " }", "", " fn flags(&self) -> FileFlags {", " with_inner!(self.inner, FileInternal, |x| x.flags())", " }", "}", "", "/// An iterator over the segments of a `File`.", "#[derive(Debug)]", "pub struct SegmentIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SegmentIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SegmentIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSegmentIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSegmentIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSegmentIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSegmentIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSegmentIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSegmentIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSegmentIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSegmentIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SegmentIterator<'data, 'file> {", " type Item = Segment<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, SegmentIteratorInternal, SegmentInternal)", " .map(|inner| Segment { inner })", " }", "}", "", "/// A segment of a `File`.", "pub struct Segment<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SegmentInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SegmentInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSegment<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSegment32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSegment64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSegment32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSegment64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSegment32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSegment64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSegment<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Segment<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " // It's painful to do much better than this", " let mut s = f.debug_struct(\"Segment\");", " match self.name() {", " Ok(Some(ref name)) => {", " s.field(\"name\", name);", " }", " Ok(None) => {}", " Err(_) => {", " s.field(\"name\", &\"<invalid>\");", " }", " }", " s.field(\"address\", &self.address())", " .field(\"size\", &self.size())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Segment<'data, 'file> {}", "", "impl<'data, 'file> ObjectSegment<'data> for Segment<'data, 'file> {", " fn address(&self) -> u64 {", " with_inner!(self.inner, SegmentInternal, |x| x.address())", " }", "", " fn size(&self) -> u64 {", " with_inner!(self.inner, SegmentInternal, |x| x.size())", " }", "", " fn align(&self) -> u64 {", " with_inner!(self.inner, SegmentInternal, |x| x.align())", " }", "", " fn file_range(&self) -> (u64, u64) {", " with_inner!(self.inner, SegmentInternal, |x| x.file_range())", " }", "", " fn data(&self) -> Result<&'data [u8]> {", " with_inner!(self.inner, SegmentInternal, |x| x.data())", " }", "", " fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {", " with_inner!(self.inner, SegmentInternal, |x| x.data_range(address, size))", " }", "", " fn name(&self) -> Result<Option<&str>> {", " with_inner!(self.inner, SegmentInternal, |x| x.name())", " }", "}", "", "/// An iterator of the sections of a `File`.", "#[derive(Debug)]", "pub struct SectionIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SectionIteratorInternal<'data, 'file>,", "}", "", "// we wrap our enums in a struct so that they are kept private.", "#[derive(Debug)]", "enum SectionIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSectionIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSectionIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSectionIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSectionIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSectionIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSectionIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSectionIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSectionIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SectionIterator<'data, 'file> {", " type Item = Section<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, SectionIteratorInternal, SectionInternal)", " .map(|inner| Section { inner })", " }", "}", "", "/// A Section of a File", "pub struct Section<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SectionInternal<'data, 'file>,", "}", "", "enum SectionInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSection<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSection32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSection64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSection32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSection64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSection32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSection64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSection<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Section<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " // It's painful to do much better than this", " let mut s = f.debug_struct(\"Section\");", " match self.segment_name() {", " Ok(Some(ref name)) => {", " s.field(\"segment\", name);", " }", " Ok(None) => {}", " Err(_) => {", " s.field(\"segment\", &\"<invalid>\");", " }", " }", " s.field(\"name\", &self.name().unwrap_or(\"<invalid>\"))", " .field(\"address\", &self.address())", " .field(\"size\", &self.size())", " .field(\"align\", &self.align())", " .field(\"kind\", &self.kind())", " .field(\"flags\", &self.flags())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Section<'data, 'file> {}", "", "impl<'data, 'file> ObjectSection<'data> for Section<'data, 'file> {", " type RelocationIterator = SectionRelocationIterator<'data, 'file>;", "", " fn index(&self) -> SectionIndex {", " with_inner!(self.inner, SectionInternal, |x| x.index())", " }", "", " fn address(&self) -> u64 {", " with_inner!(self.inner, SectionInternal, |x| x.address())", " }", "", " fn size(&self) -> u64 {", " with_inner!(self.inner, SectionInternal, |x| x.size())", " }", "", " fn align(&self) -> u64 {", " with_inner!(self.inner, SectionInternal, |x| x.align())", " }", "", " fn file_range(&self) -> Option<(u64, u64)> {", " with_inner!(self.inner, SectionInternal, |x| x.file_range())", " }", "", " fn data(&self) -> Result<&'data [u8]> {", " with_inner!(self.inner, SectionInternal, |x| x.data())", " }", "", " fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {", " with_inner!(self.inner, SectionInternal, |x| x.data_range(address, size))", " }", "", " fn compressed_data(&self) -> Result<CompressedData<'data>> {", " with_inner!(self.inner, SectionInternal, |x| x.compressed_data())", " }", "", " fn name(&self) -> Result<&str> {", " with_inner!(self.inner, SectionInternal, |x| x.name())", " }", "", " fn segment_name(&self) -> Result<Option<&str>> {", " with_inner!(self.inner, SectionInternal, |x| x.segment_name())", " }", "", " fn kind(&self) -> SectionKind {", " with_inner!(self.inner, SectionInternal, |x| x.kind())", " }", "", " fn relocations(&self) -> SectionRelocationIterator<'data, 'file> {", " SectionRelocationIterator {", " inner: map_inner!(", " self.inner,", " SectionInternal,", " SectionRelocationIteratorInternal,", " |x| x.relocations()", " ),", " }", " }", "", " fn flags(&self) -> SectionFlags {", " with_inner!(self.inner, SectionInternal, |x| x.flags())", " }", "}", "", "/// An iterator of the COMDAT section groups of a `File`.", "#[derive(Debug)]", "pub struct ComdatIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: ComdatIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum ComdatIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffComdatIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfComdatIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfComdatIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOComdatIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOComdatIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeComdatIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeComdatIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmComdatIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for ComdatIterator<'data, 'file> {", " type Item = Comdat<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, ComdatIteratorInternal, ComdatInternal)", " .map(|inner| Comdat { inner })", " }", "}", "", "/// A COMDAT section group of a `File`.", "pub struct Comdat<'data, 'file>", "where", " 'data: 'file,", "{", " inner: ComdatInternal<'data, 'file>,", "}", "", "enum ComdatInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffComdat<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfComdat32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfComdat64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOComdat32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOComdat64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeComdat32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeComdat64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmComdat<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Comdat<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " let mut s = f.debug_struct(\"Comdat\");", " s.field(\"symbol\", &self.symbol())", " .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))", " .field(\"kind\", &self.kind())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Comdat<'data, 'file> {}", "", "impl<'data, 'file> ObjectComdat<'data> for Comdat<'data, 'file> {", " type SectionIterator = ComdatSectionIterator<'data, 'file>;", "", " fn kind(&self) -> ComdatKind {", " with_inner!(self.inner, ComdatInternal, |x| x.kind())", " }", "", " fn symbol(&self) -> SymbolIndex {", " with_inner!(self.inner, ComdatInternal, |x| x.symbol())", " }", "", " fn name(&self) -> Result<&str> {", " with_inner!(self.inner, ComdatInternal, |x| x.name())", " }", "", " fn sections(&self) -> ComdatSectionIterator<'data, 'file> {", " ComdatSectionIterator {", " inner: map_inner!(", " self.inner,", " ComdatInternal,", " ComdatSectionIteratorInternal,", " |x| x.sections()", " ),", " }", " }", "}", "", "/// An iterator over COMDAT section entries.", "#[derive(Debug)]", "pub struct ComdatSectionIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: ComdatSectionIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum ComdatSectionIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffComdatSectionIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfComdatSectionIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfComdatSectionIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOComdatSectionIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOComdatSectionIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeComdatSectionIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeComdatSectionIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmComdatSectionIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for ComdatSectionIterator<'data, 'file> {", " type Item = SectionIndex;", "", " fn next(&mut self) -> Option<Self::Item> {", " with_inner_mut!(self.inner, ComdatSectionIteratorInternal, |x| x.next())", " }", "}", "", "/// A symbol table.", "#[derive(Debug)]", "pub struct SymbolTable<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SymbolTableInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SymbolTableInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSymbolTable<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSymbolTable32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSymbolTable64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSymbolTable32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSymbolTable64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(coff::CoffSymbolTable<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(coff::CoffSymbolTable<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSymbolTable<'data, 'file>),", "}", "", "impl<'data, 'file> read::private::Sealed for SymbolTable<'data, 'file> {}", "", "impl<'data, 'file> ObjectSymbolTable<'data> for SymbolTable<'data, 'file> {", " type Symbol = Symbol<'data, 'file>;", " type SymbolIterator = SymbolIterator<'data, 'file>;", "", " fn symbols(&self) -> Self::SymbolIterator {", " SymbolIterator {", " inner: map_inner!(", " self.inner,", " SymbolTableInternal,", " SymbolIteratorInternal,", " |x| x.symbols()", " ),", " }", " }", "", " fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol> {", " map_inner_option!(self.inner, SymbolTableInternal, SymbolInternal, |x| x", " .symbol_by_index(index))", " .map(|inner| Symbol { inner })", " }", "}", "", "/// An iterator over symbol table entries.", "#[derive(Debug)]", "pub struct SymbolIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SymbolIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SymbolIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSymbolIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSymbolIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSymbolIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSymbolIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSymbolIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(coff::CoffSymbolIterator<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(coff::CoffSymbolIterator<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSymbolIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SymbolIterator<'data, 'file> {", " type Item = Symbol<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, SymbolIteratorInternal, SymbolInternal)", " .map(|inner| Symbol { inner })", " }", "}", "", "/// A symbol table entry.", "pub struct Symbol<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SymbolInternal<'data, 'file>,", "}", "", "enum SymbolInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSymbol<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSymbol32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSymbol64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSymbol32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSymbol64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(coff::CoffSymbol<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(coff::CoffSymbol<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSymbol<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Symbol<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " f.debug_struct(\"Symbol\")", " .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))", " .field(\"address\", &self.address())", " .field(\"size\", &self.size())", " .field(\"kind\", &self.kind())", " .field(\"section\", &self.section())", " .field(\"scope\", &self.scope())", " .field(\"weak\", &self.is_weak())", " .field(\"flags\", &self.flags())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Symbol<'data, 'file> {}", "", "impl<'data, 'file> ObjectSymbol<'data> for Symbol<'data, 'file> {", " fn index(&self) -> SymbolIndex {", " with_inner!(self.inner, SymbolInternal, |x| x.index())", " }", "", " fn name(&self) -> Result<&'data str> {", " with_inner!(self.inner, SymbolInternal, |x| x.name())", " }", "", " fn address(&self) -> u64 {", " with_inner!(self.inner, SymbolInternal, |x| x.address())", " }", "", " fn size(&self) -> u64 {", " with_inner!(self.inner, SymbolInternal, |x| x.size())", " }", "", " fn kind(&self) -> SymbolKind {", " with_inner!(self.inner, SymbolInternal, |x| x.kind())", " }", "", " fn section(&self) -> SymbolSection {", " with_inner!(self.inner, SymbolInternal, |x| x.section())", " }", "", " fn is_undefined(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_undefined())", " }", "", " fn is_definition(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_definition())", " }", "", " fn is_common(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_common())", " }", "", " fn is_weak(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_weak())", " }", "", " fn scope(&self) -> SymbolScope {", " with_inner!(self.inner, SymbolInternal, |x| x.scope())", " }", "", " fn is_global(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_global())", " }", "", " fn is_local(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_local())", " }", "", " fn flags(&self) -> SymbolFlags<SectionIndex> {", " with_inner!(self.inner, SymbolInternal, |x| x.flags())", " }", "}", "", "/// An iterator over dynamic relocation entries.", "#[derive(Debug)]", "pub struct DynamicRelocationIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: DynamicRelocationIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum DynamicRelocationIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfDynamicRelocationIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfDynamicRelocationIterator64<'data, 'file>),", " // We need to always use the lifetime parameters.", " #[allow(unused)]", " None(PhantomData<(&'data (), &'file ())>),", "}", "", "impl<'data, 'file> Iterator for DynamicRelocationIterator<'data, 'file> {", " type Item = (u64, Relocation);", "", " fn next(&mut self) -> Option<Self::Item> {", " match self.inner {", " #[cfg(feature = \"elf\")]", " DynamicRelocationIteratorInternal::Elf32(ref mut elf) => elf.next(),", " #[cfg(feature = \"elf\")]", " DynamicRelocationIteratorInternal::Elf64(ref mut elf) => elf.next(),", " DynamicRelocationIteratorInternal::None(_) => None,", " }", " }", "}", "", "/// An iterator over section relocation entries.", "#[derive(Debug)]", "pub struct SectionRelocationIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SectionRelocationIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SectionRelocationIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffRelocationIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSectionRelocationIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSectionRelocationIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachORelocationIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachORelocationIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeRelocationIterator<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeRelocationIterator<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmRelocationIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SectionRelocationIterator<'data, 'file> {", " type Item = (u64, Relocation);", "", " fn next(&mut self) -> Option<Self::Item> {", " with_inner_mut!(self.inner, SectionRelocationIteratorInternal, |x| x.next())", " }", "}", ""]}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["s:GetVar('LanguageClient_setOmnifunc', v:true)"],"id":26}
11:30:17 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 26, "jsonrpc": "2.0", "result": true}
11:30:17 DEBUG unnamed src/language_client.rs:108 state.text_documents./mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs: null ==> {"languageId":"rust","text":"use alloc::fmt;\nuse alloc::vec::Vec;\nuse core::marker::PhantomData;\n\n#[cfg(feature = \"coff\")]\nuse crate::read::coff;\n#[cfg(feature = \"elf\")]\nuse crate::read::elf;\n#[cfg(feature = \"macho\")]\nuse crate::read::macho;\n#[cfg(feature = \"pe\")]\nuse crate::read::pe;\n#[cfg(feature = \"wasm\")]\nuse crate::read::wasm;\nuse crate::read::{\n self, Architecture, BinaryFormat, ComdatKind, CompressedData, Error, Export, FileFlags,\n FileKind, Import, Object, ObjectComdat, ObjectMap, ObjectSection, ObjectSegment, ObjectSymbol,\n ObjectSymbolTable, Relocation, Result, SectionFlags, SectionIndex, SectionKind, SymbolFlags,\n SymbolIndex, SymbolKind, SymbolMap, SymbolMapName, SymbolScope, SymbolSection,\n};\n\n/// Evaluate an expression on the contents of a file format enum.\n///\n/// This is a hack to avoid virtual calls.\nmacro_rules! with_inner {\n ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $enum::Coff(ref $var) => $body,\n #[cfg(feature = \"elf\")]\n $enum::Elf32(ref $var) => $body,\n #[cfg(feature = \"elf\")]\n $enum::Elf64(ref $var) => $body,\n #[cfg(feature = \"macho\")]\n $enum::MachO32(ref $var) => $body,\n #[cfg(feature = \"macho\")]\n $enum::MachO64(ref $var) => $body,\n #[cfg(feature = \"pe\")]\n $enum::Pe32(ref $var) => $body,\n #[cfg(feature = \"pe\")]\n $enum::Pe64(ref $var) => $body,\n #[cfg(feature = \"wasm\")]\n $enum::Wasm(ref $var) => $body,\n }\n };\n}\n\nmacro_rules! with_inner_mut {\n ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $enum::Coff(ref mut $var) => $body,\n #[cfg(feature = \"elf\")]\n $enum::Elf32(ref mut $var) => $body,\n #[cfg(feature = \"elf\")]\n $enum::Elf64(ref mut $var) => $body,\n #[cfg(feature = \"macho\")]\n $enum::MachO32(ref mut $var) => $body,\n #[cfg(feature = \"macho\")]\n $enum::MachO64(ref mut $var) => $body,\n #[cfg(feature = \"pe\")]\n $enum::Pe32(ref mut $var) => $body,\n #[cfg(feature = \"pe\")]\n $enum::Pe64(ref mut $var) => $body,\n #[cfg(feature = \"wasm\")]\n $enum::Wasm(ref mut $var) => $body,\n }\n };\n}\n\n/// Like `with_inner!`, but wraps the result in another enum.\nmacro_rules! map_inner {\n ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $from::Coff(ref $var) => $to::Coff($body),\n #[cfg(feature = \"elf\")]\n $from::Elf32(ref $var) => $to::Elf32($body),\n #[cfg(feature = \"elf\")]\n $from::Elf64(ref $var) => $to::Elf64($body),\n #[cfg(feature = \"macho\")]\n $from::MachO32(ref $var) => $to::MachO32($body),\n #[cfg(feature = \"macho\")]\n $from::MachO64(ref $var) => $to::MachO64($body),\n #[cfg(feature = \"pe\")]\n $from::Pe32(ref $var) => $to::Pe32($body),\n #[cfg(feature = \"pe\")]\n $from::Pe64(ref $var) => $to::Pe64($body),\n #[cfg(feature = \"wasm\")]\n $from::Wasm(ref $var) => $to::Wasm($body),\n }\n };\n}\n\n/// Like `map_inner!`, but the result is a Result or Option.\nmacro_rules! map_inner_option {\n ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $from::Coff(ref $var) => $body.map($to::Coff),\n #[cfg(feature = \"elf\")]\n $from::Elf32(ref $var) => $body.map($to::Elf32),\n #[cfg(feature = \"elf\")]\n $from::Elf64(ref $var) => $body.map($to::Elf64),\n #[cfg(feature = \"macho\")]\n $from::MachO32(ref $var) => $body.map($to::MachO32),\n #[cfg(feature = \"macho\")]\n $from::MachO64(ref $var) => $body.map($to::MachO64),\n #[cfg(feature = \"pe\")]\n $from::Pe32(ref $var) => $body.map($to::Pe32),\n #[cfg(feature = \"pe\")]\n $from::Pe64(ref $var) => $body.map($to::Pe64),\n #[cfg(feature = \"wasm\")]\n $from::Wasm(ref $var) => $body.map($to::Wasm),\n }\n };\n}\n\n/// Call `next` for a file format iterator.\nmacro_rules! next_inner {\n ($inner:expr, $from:ident, $to:ident) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $from::Coff(ref mut iter) => iter.next().map($to::Coff),\n #[cfg(feature = \"elf\")]\n $from::Elf32(ref mut iter) => iter.next().map($to::Elf32),\n #[cfg(feature = \"elf\")]\n $from::Elf64(ref mut iter) => iter.next().map($to::Elf64),\n #[cfg(feature = \"macho\")]\n $from::MachO32(ref mut iter) => iter.next().map($to::MachO32),\n #[cfg(feature = \"macho\")]\n $from::MachO64(ref mut iter) => iter.next().map($to::MachO64),\n #[cfg(feature = \"pe\")]\n $from::Pe32(ref mut iter) => iter.next().map($to::Pe32),\n #[cfg(feature = \"pe\")]\n $from::Pe64(ref mut iter) => iter.next().map($to::Pe64),\n #[cfg(feature = \"wasm\")]\n $from::Wasm(ref mut iter) => iter.next().map($to::Wasm),\n }\n };\n}\n\n/// An object file.\n///\n/// Most functionality is provided by the `Object` trait implementation.\n#[derive(Debug)]\npub struct File<'data> {\n inner: FileInternal<'data>,\n}\n\n#[allow(clippy::large_enum_variant)]\n#[derive(Debug)]\nenum FileInternal<'data> {\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffFile<'data>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfFile32<'data>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfFile64<'data>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOFile32<'data>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOFile64<'data>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeFile32<'data>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeFile64<'data>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmFile<'data>),\n}\n\nimpl<'data> File<'data> {\n /// Parse the raw file data.\n pub fn parse(data: &'data [u8]) -> Result<Self> {\n let inner = match FileKind::parse(data)? {\n #[cfg(feature = \"elf\")]\n FileKind::Elf32 => FileInternal::Elf32(elf::ElfFile32::parse(data)?),\n #[cfg(feature = \"elf\")]\n FileKind::Elf64 => FileInternal::Elf64(elf::ElfFile64::parse(data)?),\n #[cfg(feature = \"macho\")]\n FileKind::MachO32 => FileInternal::MachO32(macho::MachOFile32::parse(data)?),\n #[cfg(feature = \"macho\")]\n FileKind::MachO64 => FileInternal::MachO64(macho::MachOFile64::parse(data)?),\n #[cfg(feature = \"wasm\")]\n FileKind::Wasm => FileInternal::Wasm(wasm::WasmFile::parse(data)?),\n #[cfg(feature = \"pe\")]\n FileKind::Pe32 => FileInternal::Pe32(pe::PeFile32::parse(data)?),\n #[cfg(feature = \"pe\")]\n FileKind::Pe64 => FileInternal::Pe64(pe::PeFile64::parse(data)?),\n #[cfg(feature = \"coff\")]\n FileKind::Coff => FileInternal::Coff(coff::CoffFile::parse(data)?),\n _ => return Err(Error(\"Unsupported file format\")),\n };\n Ok(File { inner })\n }\n\n /// Return the file format.\n pub fn format(&self) -> BinaryFormat {\n match self.inner {\n #[cfg(feature = \"coff\")]\n FileInternal::Coff(_) => BinaryFormat::Coff,\n #[cfg(feature = \"elf\")]\n FileInternal::Elf32(_) | FileInternal::Elf64(_) => BinaryFormat::Elf,\n #[cfg(feature = \"macho\")]\n FileInternal::MachO32(_) | FileInternal::MachO64(_) => BinaryFormat::MachO,\n #[cfg(feature = \"pe\")]\n FileInternal::Pe32(_) | FileInternal::Pe64(_) => BinaryFormat::Pe,\n #[cfg(feature = \"wasm\")]\n FileInternal::Wasm(_) => BinaryFormat::Wasm,\n }\n }\n}\n\nimpl<'data> read::private::Sealed for File<'data> {}\n\nimpl<'data, 'file> Object<'data, 'file> for File<'data>\nwhere\n 'data: 'file,\n{\n type Segment = Segment<'data, 'file>;\n type SegmentIterator = SegmentIterator<'data, 'file>;\n type Section = Section<'data, 'file>;\n type SectionIterator = SectionIterator<'data, 'file>;\n type Comdat = Comdat<'data, 'file>;\n type ComdatIterator = ComdatIterator<'data, 'file>;\n type Symbol = Symbol<'data, 'file>;\n type SymbolIterator = SymbolIterator<'data, 'file>;\n type SymbolTable = SymbolTable<'data, 'file>;\n type DynamicRelocationIterator = DynamicRelocationIterator<'data, 'file>;\n\n fn architecture(&self) -> Architecture {\n with_inner!(self.inner, FileInternal, |x| x.architecture())\n }\n\n fn is_little_endian(&self) -> bool {\n with_inner!(self.inner, FileInternal, |x| x.is_little_endian())\n }\n\n fn is_64(&self) -> bool {\n with_inner!(self.inner, FileInternal, |x| x.is_64())\n }\n\n fn segments(&'file self) -> SegmentIterator<'data, 'file> {\n SegmentIterator {\n inner: map_inner!(self.inner, FileInternal, SegmentIteratorInternal, |x| x\n .segments()),\n }\n }\n\n fn section_by_name(&'file self, section_name: &str) -> Option<Section<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x\n .section_by_name(section_name))\n .map(|inner| Section { inner })\n }\n\n fn section_by_index(&'file self, index: SectionIndex) -> Result<Section<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x\n .section_by_index(index))\n .map(|inner| Section { inner })\n }\n\n fn sections(&'file self) -> SectionIterator<'data, 'file> {\n SectionIterator {\n inner: map_inner!(self.inner, FileInternal, SectionIteratorInternal, |x| x\n .sections()),\n }\n }\n\n fn comdats(&'file self) -> ComdatIterator<'data, 'file> {\n ComdatIterator {\n inner: map_inner!(self.inner, FileInternal, ComdatIteratorInternal, |x| x\n .comdats()),\n }\n }\n\n fn symbol_by_index(&'file self, index: SymbolIndex) -> Result<Symbol<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SymbolInternal, |x| x\n .symbol_by_index(index))\n .map(|inner| Symbol { inner })\n }\n\n fn symbols(&'file self) -> SymbolIterator<'data, 'file> {\n SymbolIterator {\n inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x\n .symbols()),\n }\n }\n\n fn symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x\n .symbol_table())\n .map(|inner| SymbolTable { inner })\n }\n\n fn dynamic_symbols(&'file self) -> SymbolIterator<'data, 'file> {\n SymbolIterator {\n inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x\n .dynamic_symbols()),\n }\n }\n\n fn dynamic_symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x\n .dynamic_symbol_table())\n .map(|inner| SymbolTable { inner })\n }\n\n #[cfg(feature = \"elf\")]\n fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {\n let inner = match self.inner {\n FileInternal::Elf32(ref elf) => {\n DynamicRelocationIteratorInternal::Elf32(elf.dynamic_relocations()?)\n }\n FileInternal::Elf64(ref elf) => {\n DynamicRelocationIteratorInternal::Elf64(elf.dynamic_relocations()?)\n }\n _ => return None,\n };\n Some(DynamicRelocationIterator { inner })\n }\n\n #[cfg(not(feature = \"elf\"))]\n fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {\n None\n }\n\n fn symbol_map(&self) -> SymbolMap<SymbolMapName<'data>> {\n with_inner!(self.inner, FileInternal, |x| x.symbol_map())\n }\n\n fn object_map(&self) -> ObjectMap<'data> {\n with_inner!(self.inner, FileInternal, |x| x.object_map())\n }\n\n fn imports(&self) -> Result<Vec<Import<'data>>> {\n with_inner!(self.inner, FileInternal, |x| x.imports())\n }\n\n fn exports(&self) -> Result<Vec<Export<'data>>> {\n with_inner!(self.inner, FileInternal, |x| x.exports())\n }\n\n fn has_debug_symbols(&self) -> bool {\n with_inner!(self.inner, FileInternal, |x| x.has_debug_symbols())\n }\n\n #[inline]\n fn mach_uuid(&self) -> Result<Option<[u8; 16]>> {\n with_inner!(self.inner, FileInternal, |x| x.mach_uuid())\n }\n\n #[inline]\n fn build_id(&self) -> Result<Option<&'data [u8]>> {\n with_inner!(self.inner, FileInternal, |x| x.build_id())\n }\n\n #[inline]\n fn gnu_debuglink(&self) -> Result<Option<(&'data [u8], u32)>> {\n with_inner!(self.inner, FileInternal, |x| x.gnu_debuglink())\n }\n\n fn entry(&self) -> u64 {\n with_inner!(self.inner, FileInternal, |x| x.entry())\n }\n\n fn flags(&self) -> FileFlags {\n with_inner!(self.inner, FileInternal, |x| x.flags())\n }\n}\n\n/// An iterator over the segments of a `File`.\n#[derive(Debug)]\npub struct SegmentIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SegmentIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SegmentIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSegmentIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSegmentIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSegmentIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSegmentIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSegmentIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeSegmentIterator32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeSegmentIterator64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSegmentIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for SegmentIterator<'data, 'file> {\n type Item = Segment<'data, 'file>;\n\n fn next(&mut self) -> Option<Self::Item> {\n next_inner!(self.inner, SegmentIteratorInternal, SegmentInternal)\n .map(|inner| Segment { inner })\n }\n}\n\n/// A segment of a `File`.\npub struct Segment<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SegmentInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SegmentInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSegment<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSegment32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSegment64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSegment32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSegment64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeSegment32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeSegment64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSegment<'data, 'file>),\n}\n\nimpl<'data, 'file> fmt::Debug for Segment<'data, 'file> {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n // It's painful to do much better than this\n let mut s = f.debug_struct(\"Segment\");\n match self.name() {\n Ok(Some(ref name)) => {\n s.field(\"name\", name);\n }\n Ok(None) => {}\n Err(_) => {\n s.field(\"name\", &\"<invalid>\");\n }\n }\n s.field(\"address\", &self.address())\n .field(\"size\", &self.size())\n .finish()\n }\n}\n\nimpl<'data, 'file> read::private::Sealed for Segment<'data, 'file> {}\n\nimpl<'data, 'file> ObjectSegment<'data> for Segment<'data, 'file> {\n fn address(&self) -> u64 {\n with_inner!(self.inner, SegmentInternal, |x| x.address())\n }\n\n fn size(&self) -> u64 {\n with_inner!(self.inner, SegmentInternal, |x| x.size())\n }\n\n fn align(&self) -> u64 {\n with_inner!(self.inner, SegmentInternal, |x| x.align())\n }\n\n fn file_range(&self) -> (u64, u64) {\n with_inner!(self.inner, SegmentInternal, |x| x.file_range())\n }\n\n fn data(&self) -> Result<&'data [u8]> {\n with_inner!(self.inner, SegmentInternal, |x| x.data())\n }\n\n fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {\n with_inner!(self.inner, SegmentInternal, |x| x.data_range(address, size))\n }\n\n fn name(&self) -> Result<Option<&str>> {\n with_inner!(self.inner, SegmentInternal, |x| x.name())\n }\n}\n\n/// An iterator of the sections of a `File`.\n#[derive(Debug)]\npub struct SectionIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SectionIteratorInternal<'data, 'file>,\n}\n\n// we wrap our enums in a struct so that they are kept private.\n#[derive(Debug)]\nenum SectionIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSectionIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSectionIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSectionIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSectionIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSectionIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeSectionIterator32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeSectionIterator64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSectionIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for SectionIterator<'data, 'file> {\n type Item = Section<'data, 'file>;\n\n fn next(&mut self) -> Option<Self::Item> {\n next_inner!(self.inner, SectionIteratorInternal, SectionInternal)\n .map(|inner| Section { inner })\n }\n}\n\n/// A Section of a File\npub struct Section<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SectionInternal<'data, 'file>,\n}\n\nenum SectionInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSection<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSection32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSection64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSection32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSection64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeSection32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeSection64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSection<'data, 'file>),\n}\n\nimpl<'data, 'file> fmt::Debug for Section<'data, 'file> {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n // It's painful to do much better than this\n let mut s = f.debug_struct(\"Section\");\n match self.segment_name() {\n Ok(Some(ref name)) => {\n s.field(\"segment\", name);\n }\n Ok(None) => {}\n Err(_) => {\n s.field(\"segment\", &\"<invalid>\");\n }\n }\n s.field(\"name\", &self.name().unwrap_or(\"<invalid>\"))\n .field(\"address\", &self.address())\n .field(\"size\", &self.size())\n .field(\"align\", &self.align())\n .field(\"kind\", &self.kind())\n .field(\"flags\", &self.flags())\n .finish()\n }\n}\n\nimpl<'data, 'file> read::private::Sealed for Section<'data, 'file> {}\n\nimpl<'data, 'file> ObjectSection<'data> for Section<'data, 'file> {\n type RelocationIterator = SectionRelocationIterator<'data, 'file>;\n\n fn index(&self) -> SectionIndex {\n with_inner!(self.inner, SectionInternal, |x| x.index())\n }\n\n fn address(&self) -> u64 {\n with_inner!(self.inner, SectionInternal, |x| x.address())\n }\n\n fn size(&self) -> u64 {\n with_inner!(self.inner, SectionInternal, |x| x.size())\n }\n\n fn align(&self) -> u64 {\n with_inner!(self.inner, SectionInternal, |x| x.align())\n }\n\n fn file_range(&self) -> Option<(u64, u64)> {\n with_inner!(self.inner, SectionInternal, |x| x.file_range())\n }\n\n fn data(&self) -> Result<&'data [u8]> {\n with_inner!(self.inner, SectionInternal, |x| x.data())\n }\n\n fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {\n with_inner!(self.inner, SectionInternal, |x| x.data_range(address, size))\n }\n\n fn compressed_data(&self) -> Result<CompressedData<'data>> {\n with_inner!(self.inner, SectionInternal, |x| x.compressed_data())\n }\n\n fn name(&self) -> Result<&str> {\n with_inner!(self.inner, SectionInternal, |x| x.name())\n }\n\n fn segment_name(&self) -> Result<Option<&str>> {\n with_inner!(self.inner, SectionInternal, |x| x.segment_name())\n }\n\n fn kind(&self) -> SectionKind {\n with_inner!(self.inner, SectionInternal, |x| x.kind())\n }\n\n fn relocations(&self) -> SectionRelocationIterator<'data, 'file> {\n SectionRelocationIterator {\n inner: map_inner!(\n self.inner,\n SectionInternal,\n SectionRelocationIteratorInternal,\n |x| x.relocations()\n ),\n }\n }\n\n fn flags(&self) -> SectionFlags {\n with_inner!(self.inner, SectionInternal, |x| x.flags())\n }\n}\n\n/// An iterator of the COMDAT section groups of a `File`.\n#[derive(Debug)]\npub struct ComdatIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: ComdatIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum ComdatIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffComdatIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfComdatIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfComdatIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOComdatIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOComdatIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeComdatIterator32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeComdatIterator64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmComdatIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for ComdatIterator<'data, 'file> {\n type Item = Comdat<'data, 'file>;\n\n fn next(&mut self) -> Option<Self::Item> {\n next_inner!(self.inner, ComdatIteratorInternal, ComdatInternal)\n .map(|inner| Comdat { inner })\n }\n}\n\n/// A COMDAT section group of a `File`.\npub struct Comdat<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: ComdatInternal<'data, 'file>,\n}\n\nenum ComdatInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffComdat<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfComdat32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfComdat64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOComdat32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOComdat64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeComdat32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeComdat64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmComdat<'data, 'file>),\n}\n\nimpl<'data, 'file> fmt::Debug for Comdat<'data, 'file> {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let mut s = f.debug_struct(\"Comdat\");\n s.field(\"symbol\", &self.symbol())\n .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))\n .field(\"kind\", &self.kind())\n .finish()\n }\n}\n\nimpl<'data, 'file> read::private::Sealed for Comdat<'data, 'file> {}\n\nimpl<'data, 'file> ObjectComdat<'data> for Comdat<'data, 'file> {\n type SectionIterator = ComdatSectionIterator<'data, 'file>;\n\n fn kind(&self) -> ComdatKind {\n with_inner!(self.inner, ComdatInternal, |x| x.kind())\n }\n\n fn symbol(&self) -> SymbolIndex {\n with_inner!(self.inner, ComdatInternal, |x| x.symbol())\n }\n\n fn name(&self) -> Result<&str> {\n with_inner!(self.inner, ComdatInternal, |x| x.name())\n }\n\n fn sections(&self) -> ComdatSectionIterator<'data, 'file> {\n ComdatSectionIterator {\n inner: map_inner!(\n self.inner,\n ComdatInternal,\n ComdatSectionIteratorInternal,\n |x| x.sections()\n ),\n }\n }\n}\n\n/// An iterator over COMDAT section entries.\n#[derive(Debug)]\npub struct ComdatSectionIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: ComdatSectionIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum ComdatSectionIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffComdatSectionIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfComdatSectionIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfComdatSectionIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOComdatSectionIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOComdatSectionIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeComdatSectionIterator32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeComdatSectionIterator64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmComdatSectionIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for ComdatSectionIterator<'data, 'file> {\n type Item = SectionIndex;\n\n fn next(&mut self) -> Option<Self::Item> {\n with_inner_mut!(self.inner, ComdatSectionIteratorInternal, |x| x.next())\n }\n}\n\n/// A symbol table.\n#[derive(Debug)]\npub struct SymbolTable<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SymbolTableInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SymbolTableInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSymbolTable<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSymbolTable32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSymbolTable64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSymbolTable32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSymbolTable64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(coff::CoffSymbolTable<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(coff::CoffSymbolTable<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSymbolTable<'data, 'file>),\n}\n\nimpl<'data, 'file> read::private::Sealed for SymbolTable<'data, 'file> {}\n\nimpl<'data, 'file> ObjectSymbolTable<'data> for SymbolTable<'data, 'file> {\n type Symbol = Symbol<'data, 'file>;\n type SymbolIterator = SymbolIterator<'data, 'file>;\n\n fn symbols(&self) -> Self::SymbolIterator {\n SymbolIterator {\n inner: map_inner!(\n self.inner,\n SymbolTableInternal,\n SymbolIteratorInternal,\n |x| x.symbols()\n ),\n }\n }\n\n fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol> {\n map_inner_option!(self.inner, SymbolTableInternal, SymbolInternal, |x| x\n .symbol_by_index(index))\n .map(|inner| Symbol { inner })\n }\n}\n\n/// An iterator over symbol table entries.\n#[derive(Debug)]\npub struct SymbolIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SymbolIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SymbolIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSymbolIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSymbolIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSymbolIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSymbolIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSymbolIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(coff::CoffSymbolIterator<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(coff::CoffSymbolIterator<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSymbolIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for SymbolIterator<'data, 'file> {\n type Item = Symbol<'data, 'file>;\n\n fn next(&mut self) -> Option<Self::Item> {\n next_inner!(self.inner, SymbolIteratorInternal, SymbolInternal)\n .map(|inner| Symbol { inner })\n }\n}\n\n/// A symbol table entry.\npub struct Symbol<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SymbolInternal<'data, 'file>,\n}\n\nenum SymbolInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSymbol<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSymbol32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSymbol64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSymbol32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSymbol64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(coff::CoffSymbol<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(coff::CoffSymbol<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSymbol<'data, 'file>),\n}\n\nimpl<'data, 'file> fmt::Debug for Symbol<'data, 'file> {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n f.debug_struct(\"Symbol\")\n .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))\n .field(\"address\", &self.address())\n .field(\"size\", &self.size())\n .field(\"kind\", &self.kind())\n .field(\"section\", &self.section())\n .field(\"scope\", &self.scope())\n .field(\"weak\", &self.is_weak())\n .field(\"flags\", &self.flags())\n .finish()\n }\n}\n\nimpl<'data, 'file> read::private::Sealed for Symbol<'data, 'file> {}\n\nimpl<'data, 'file> ObjectSymbol<'data> for Symbol<'data, 'file> {\n fn index(&self) -> SymbolIndex {\n with_inner!(self.inner, SymbolInternal, |x| x.index())\n }\n\n fn name(&self) -> Result<&'data str> {\n with_inner!(self.inner, SymbolInternal, |x| x.name())\n }\n\n fn address(&self) -> u64 {\n with_inner!(self.inner, SymbolInternal, |x| x.address())\n }\n\n fn size(&self) -> u64 {\n with_inner!(self.inner, SymbolInternal, |x| x.size())\n }\n\n fn kind(&self) -> SymbolKind {\n with_inner!(self.inner, SymbolInternal, |x| x.kind())\n }\n\n fn section(&self) -> SymbolSection {\n with_inner!(self.inner, SymbolInternal, |x| x.section())\n }\n\n fn is_undefined(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_undefined())\n }\n\n fn is_definition(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_definition())\n }\n\n fn is_common(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_common())\n }\n\n fn is_weak(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_weak())\n }\n\n fn scope(&self) -> SymbolScope {\n with_inner!(self.inner, SymbolInternal, |x| x.scope())\n }\n\n fn is_global(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_global())\n }\n\n fn is_local(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_local())\n }\n\n fn flags(&self) -> SymbolFlags<SectionIndex> {\n with_inner!(self.inner, SymbolInternal, |x| x.flags())\n }\n}\n\n/// An iterator over dynamic relocation entries.\n#[derive(Debug)]\npub struct DynamicRelocationIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: DynamicRelocationIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum DynamicRelocationIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfDynamicRelocationIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfDynamicRelocationIterator64<'data, 'file>),\n // We need to always use the lifetime parameters.\n #[allow(unused)]\n None(PhantomData<(&'data (), &'file ())>),\n}\n\nimpl<'data, 'file> Iterator for DynamicRelocationIterator<'data, 'file> {\n type Item = (u64, Relocation);\n\n fn next(&mut self) -> Option<Self::Item> {\n match self.inner {\n #[cfg(feature = \"elf\")]\n DynamicRelocationIteratorInternal::Elf32(ref mut elf) => elf.next(),\n #[cfg(feature = \"elf\")]\n DynamicRelocationIteratorInternal::Elf64(ref mut elf) => elf.next(),\n DynamicRelocationIteratorInternal::None(_) => None,\n }\n }\n}\n\n/// An iterator over section relocation entries.\n#[derive(Debug)]\npub struct SectionRelocationIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SectionRelocationIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SectionRelocationIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffRelocationIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSectionRelocationIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSectionRelocationIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachORelocationIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachORelocationIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeRelocationIterator<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeRelocationIterator<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmRelocationIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for SectionRelocationIterator<'data, 'file> {\n type Item = (u64, Relocation);\n\n fn next(&mut self) -> Option<Self::Item> {\n with_inner_mut!(self.inner, SectionRelocationIteratorInternal, |x| x.next())\n }\n}\n","uri":"file:///mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs","version":0}
11:30:17 INFO unnamed src/language_server_protocol.rs:1888 text_document_code_lens; params=Object({"bufnr": Number(2), "filename": String("/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "languageId": String("rust"), "position": Object({"character": Number(0), "line": Number(0)}), "viewport": Object({"end": Number(67), "start": Number(0)})})
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:command","params":["setlocal omnifunc=LanguageClient#complete"]}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setbufvar","params":["/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs","LanguageClient_projectRoot","/mnt/home/wantlord/develop/study/languageclienttest"]}
11:30:17 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:ExecuteAutocmd","params":["LanguageClientTextDocumentDidOpenPost"]}
11:30:17 DEBUG writer-Some("rust") src/rpcclient.rs:254 => Some("rust") {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"rust","text":"use alloc::fmt;\nuse alloc::vec::Vec;\nuse core::marker::PhantomData;\n\n#[cfg(feature = \"coff\")]\nuse crate::read::coff;\n#[cfg(feature = \"elf\")]\nuse crate::read::elf;\n#[cfg(feature = \"macho\")]\nuse crate::read::macho;\n#[cfg(feature = \"pe\")]\nuse crate::read::pe;\n#[cfg(feature = \"wasm\")]\nuse crate::read::wasm;\nuse crate::read::{\n self, Architecture, BinaryFormat, ComdatKind, CompressedData, Error, Export, FileFlags,\n FileKind, Import, Object, ObjectComdat, ObjectMap, ObjectSection, ObjectSegment, ObjectSymbol,\n ObjectSymbolTable, Relocation, Result, SectionFlags, SectionIndex, SectionKind, SymbolFlags,\n SymbolIndex, SymbolKind, SymbolMap, SymbolMapName, SymbolScope, SymbolSection,\n};\n\n/// Evaluate an expression on the contents of a file format enum.\n///\n/// This is a hack to avoid virtual calls.\nmacro_rules! with_inner {\n ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $enum::Coff(ref $var) => $body,\n #[cfg(feature = \"elf\")]\n $enum::Elf32(ref $var) => $body,\n #[cfg(feature = \"elf\")]\n $enum::Elf64(ref $var) => $body,\n #[cfg(feature = \"macho\")]\n $enum::MachO32(ref $var) => $body,\n #[cfg(feature = \"macho\")]\n $enum::MachO64(ref $var) => $body,\n #[cfg(feature = \"pe\")]\n $enum::Pe32(ref $var) => $body,\n #[cfg(feature = \"pe\")]\n $enum::Pe64(ref $var) => $body,\n #[cfg(feature = \"wasm\")]\n $enum::Wasm(ref $var) => $body,\n }\n };\n}\n\nmacro_rules! with_inner_mut {\n ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $enum::Coff(ref mut $var) => $body,\n #[cfg(feature = \"elf\")]\n $enum::Elf32(ref mut $var) => $body,\n #[cfg(feature = \"elf\")]\n $enum::Elf64(ref mut $var) => $body,\n #[cfg(feature = \"macho\")]\n $enum::MachO32(ref mut $var) => $body,\n #[cfg(feature = \"macho\")]\n $enum::MachO64(ref mut $var) => $body,\n #[cfg(feature = \"pe\")]\n $enum::Pe32(ref mut $var) => $body,\n #[cfg(feature = \"pe\")]\n $enum::Pe64(ref mut $var) => $body,\n #[cfg(feature = \"wasm\")]\n $enum::Wasm(ref mut $var) => $body,\n }\n };\n}\n\n/// Like `with_inner!`, but wraps the result in another enum.\nmacro_rules! map_inner {\n ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $from::Coff(ref $var) => $to::Coff($body),\n #[cfg(feature = \"elf\")]\n $from::Elf32(ref $var) => $to::Elf32($body),\n #[cfg(feature = \"elf\")]\n $from::Elf64(ref $var) => $to::Elf64($body),\n #[cfg(feature = \"macho\")]\n $from::MachO32(ref $var) => $to::MachO32($body),\n #[cfg(feature = \"macho\")]\n $from::MachO64(ref $var) => $to::MachO64($body),\n #[cfg(feature = \"pe\")]\n $from::Pe32(ref $var) => $to::Pe32($body),\n #[cfg(feature = \"pe\")]\n $from::Pe64(ref $var) => $to::Pe64($body),\n #[cfg(feature = \"wasm\")]\n $from::Wasm(ref $var) => $to::Wasm($body),\n }\n };\n}\n\n/// Like `map_inner!`, but the result is a Result or Option.\nmacro_rules! map_inner_option {\n ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $from::Coff(ref $var) => $body.map($to::Coff),\n #[cfg(feature = \"elf\")]\n $from::Elf32(ref $var) => $body.map($to::Elf32),\n #[cfg(feature = \"elf\")]\n $from::Elf64(ref $var) => $body.map($to::Elf64),\n #[cfg(feature = \"macho\")]\n $from::MachO32(ref $var) => $body.map($to::MachO32),\n #[cfg(feature = \"macho\")]\n $from::MachO64(ref $var) => $body.map($to::MachO64),\n #[cfg(feature = \"pe\")]\n $from::Pe32(ref $var) => $body.map($to::Pe32),\n #[cfg(feature = \"pe\")]\n $from::Pe64(ref $var) => $body.map($to::Pe64),\n #[cfg(feature = \"wasm\")]\n $from::Wasm(ref $var) => $body.map($to::Wasm),\n }\n };\n}\n\n/// Call `next` for a file format iterator.\nmacro_rules! next_inner {\n ($inner:expr, $from:ident, $to:ident) => {\n match $inner {\n #[cfg(feature = \"coff\")]\n $from::Coff(ref mut iter) => iter.next().map($to::Coff),\n #[cfg(feature = \"elf\")]\n $from::Elf32(ref mut iter) => iter.next().map($to::Elf32),\n #[cfg(feature = \"elf\")]\n $from::Elf64(ref mut iter) => iter.next().map($to::Elf64),\n #[cfg(feature = \"macho\")]\n $from::MachO32(ref mut iter) => iter.next().map($to::MachO32),\n #[cfg(feature = \"macho\")]\n $from::MachO64(ref mut iter) => iter.next().map($to::MachO64),\n #[cfg(feature = \"pe\")]\n $from::Pe32(ref mut iter) => iter.next().map($to::Pe32),\n #[cfg(feature = \"pe\")]\n $from::Pe64(ref mut iter) => iter.next().map($to::Pe64),\n #[cfg(feature = \"wasm\")]\n $from::Wasm(ref mut iter) => iter.next().map($to::Wasm),\n }\n };\n}\n\n/// An object file.\n///\n/// Most functionality is provided by the `Object` trait implementation.\n#[derive(Debug)]\npub struct File<'data> {\n inner: FileInternal<'data>,\n}\n\n#[allow(clippy::large_enum_variant)]\n#[derive(Debug)]\nenum FileInternal<'data> {\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffFile<'data>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfFile32<'data>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfFile64<'data>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOFile32<'data>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOFile64<'data>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeFile32<'data>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeFile64<'data>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmFile<'data>),\n}\n\nimpl<'data> File<'data> {\n /// Parse the raw file data.\n pub fn parse(data: &'data [u8]) -> Result<Self> {\n let inner = match FileKind::parse(data)? {\n #[cfg(feature = \"elf\")]\n FileKind::Elf32 => FileInternal::Elf32(elf::ElfFile32::parse(data)?),\n #[cfg(feature = \"elf\")]\n FileKind::Elf64 => FileInternal::Elf64(elf::ElfFile64::parse(data)?),\n #[cfg(feature = \"macho\")]\n FileKind::MachO32 => FileInternal::MachO32(macho::MachOFile32::parse(data)?),\n #[cfg(feature = \"macho\")]\n FileKind::MachO64 => FileInternal::MachO64(macho::MachOFile64::parse(data)?),\n #[cfg(feature = \"wasm\")]\n FileKind::Wasm => FileInternal::Wasm(wasm::WasmFile::parse(data)?),\n #[cfg(feature = \"pe\")]\n FileKind::Pe32 => FileInternal::Pe32(pe::PeFile32::parse(data)?),\n #[cfg(feature = \"pe\")]\n FileKind::Pe64 => FileInternal::Pe64(pe::PeFile64::parse(data)?),\n #[cfg(feature = \"coff\")]\n FileKind::Coff => FileInternal::Coff(coff::CoffFile::parse(data)?),\n _ => return Err(Error(\"Unsupported file format\")),\n };\n Ok(File { inner })\n }\n\n /// Return the file format.\n pub fn format(&self) -> BinaryFormat {\n match self.inner {\n #[cfg(feature = \"coff\")]\n FileInternal::Coff(_) => BinaryFormat::Coff,\n #[cfg(feature = \"elf\")]\n FileInternal::Elf32(_) | FileInternal::Elf64(_) => BinaryFormat::Elf,\n #[cfg(feature = \"macho\")]\n FileInternal::MachO32(_) | FileInternal::MachO64(_) => BinaryFormat::MachO,\n #[cfg(feature = \"pe\")]\n FileInternal::Pe32(_) | FileInternal::Pe64(_) => BinaryFormat::Pe,\n #[cfg(feature = \"wasm\")]\n FileInternal::Wasm(_) => BinaryFormat::Wasm,\n }\n }\n}\n\nimpl<'data> read::private::Sealed for File<'data> {}\n\nimpl<'data, 'file> Object<'data, 'file> for File<'data>\nwhere\n 'data: 'file,\n{\n type Segment = Segment<'data, 'file>;\n type SegmentIterator = SegmentIterator<'data, 'file>;\n type Section = Section<'data, 'file>;\n type SectionIterator = SectionIterator<'data, 'file>;\n type Comdat = Comdat<'data, 'file>;\n type ComdatIterator = ComdatIterator<'data, 'file>;\n type Symbol = Symbol<'data, 'file>;\n type SymbolIterator = SymbolIterator<'data, 'file>;\n type SymbolTable = SymbolTable<'data, 'file>;\n type DynamicRelocationIterator = DynamicRelocationIterator<'data, 'file>;\n\n fn architecture(&self) -> Architecture {\n with_inner!(self.inner, FileInternal, |x| x.architecture())\n }\n\n fn is_little_endian(&self) -> bool {\n with_inner!(self.inner, FileInternal, |x| x.is_little_endian())\n }\n\n fn is_64(&self) -> bool {\n with_inner!(self.inner, FileInternal, |x| x.is_64())\n }\n\n fn segments(&'file self) -> SegmentIterator<'data, 'file> {\n SegmentIterator {\n inner: map_inner!(self.inner, FileInternal, SegmentIteratorInternal, |x| x\n .segments()),\n }\n }\n\n fn section_by_name(&'file self, section_name: &str) -> Option<Section<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x\n .section_by_name(section_name))\n .map(|inner| Section { inner })\n }\n\n fn section_by_index(&'file self, index: SectionIndex) -> Result<Section<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x\n .section_by_index(index))\n .map(|inner| Section { inner })\n }\n\n fn sections(&'file self) -> SectionIterator<'data, 'file> {\n SectionIterator {\n inner: map_inner!(self.inner, FileInternal, SectionIteratorInternal, |x| x\n .sections()),\n }\n }\n\n fn comdats(&'file self) -> ComdatIterator<'data, 'file> {\n ComdatIterator {\n inner: map_inner!(self.inner, FileInternal, ComdatIteratorInternal, |x| x\n .comdats()),\n }\n }\n\n fn symbol_by_index(&'file self, index: SymbolIndex) -> Result<Symbol<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SymbolInternal, |x| x\n .symbol_by_index(index))\n .map(|inner| Symbol { inner })\n }\n\n fn symbols(&'file self) -> SymbolIterator<'data, 'file> {\n SymbolIterator {\n inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x\n .symbols()),\n }\n }\n\n fn symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x\n .symbol_table())\n .map(|inner| SymbolTable { inner })\n }\n\n fn dynamic_symbols(&'file self) -> SymbolIterator<'data, 'file> {\n SymbolIterator {\n inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x\n .dynamic_symbols()),\n }\n }\n\n fn dynamic_symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {\n map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x\n .dynamic_symbol_table())\n .map(|inner| SymbolTable { inner })\n }\n\n #[cfg(feature = \"elf\")]\n fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {\n let inner = match self.inner {\n FileInternal::Elf32(ref elf) => {\n DynamicRelocationIteratorInternal::Elf32(elf.dynamic_relocations()?)\n }\n FileInternal::Elf64(ref elf) => {\n DynamicRelocationIteratorInternal::Elf64(elf.dynamic_relocations()?)\n }\n _ => return None,\n };\n Some(DynamicRelocationIterator { inner })\n }\n\n #[cfg(not(feature = \"elf\"))]\n fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {\n None\n }\n\n fn symbol_map(&self) -> SymbolMap<SymbolMapName<'data>> {\n with_inner!(self.inner, FileInternal, |x| x.symbol_map())\n }\n\n fn object_map(&self) -> ObjectMap<'data> {\n with_inner!(self.inner, FileInternal, |x| x.object_map())\n }\n\n fn imports(&self) -> Result<Vec<Import<'data>>> {\n with_inner!(self.inner, FileInternal, |x| x.imports())\n }\n\n fn exports(&self) -> Result<Vec<Export<'data>>> {\n with_inner!(self.inner, FileInternal, |x| x.exports())\n }\n\n fn has_debug_symbols(&self) -> bool {\n with_inner!(self.inner, FileInternal, |x| x.has_debug_symbols())\n }\n\n #[inline]\n fn mach_uuid(&self) -> Result<Option<[u8; 16]>> {\n with_inner!(self.inner, FileInternal, |x| x.mach_uuid())\n }\n\n #[inline]\n fn build_id(&self) -> Result<Option<&'data [u8]>> {\n with_inner!(self.inner, FileInternal, |x| x.build_id())\n }\n\n #[inline]\n fn gnu_debuglink(&self) -> Result<Option<(&'data [u8], u32)>> {\n with_inner!(self.inner, FileInternal, |x| x.gnu_debuglink())\n }\n\n fn entry(&self) -> u64 {\n with_inner!(self.inner, FileInternal, |x| x.entry())\n }\n\n fn flags(&self) -> FileFlags {\n with_inner!(self.inner, FileInternal, |x| x.flags())\n }\n}\n\n/// An iterator over the segments of a `File`.\n#[derive(Debug)]\npub struct SegmentIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SegmentIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SegmentIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSegmentIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSegmentIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSegmentIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSegmentIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSegmentIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeSegmentIterator32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeSegmentIterator64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSegmentIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for SegmentIterator<'data, 'file> {\n type Item = Segment<'data, 'file>;\n\n fn next(&mut self) -> Option<Self::Item> {\n next_inner!(self.inner, SegmentIteratorInternal, SegmentInternal)\n .map(|inner| Segment { inner })\n }\n}\n\n/// A segment of a `File`.\npub struct Segment<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SegmentInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SegmentInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSegment<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSegment32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSegment64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSegment32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSegment64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeSegment32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeSegment64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSegment<'data, 'file>),\n}\n\nimpl<'data, 'file> fmt::Debug for Segment<'data, 'file> {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n // It's painful to do much better than this\n let mut s = f.debug_struct(\"Segment\");\n match self.name() {\n Ok(Some(ref name)) => {\n s.field(\"name\", name);\n }\n Ok(None) => {}\n Err(_) => {\n s.field(\"name\", &\"<invalid>\");\n }\n }\n s.field(\"address\", &self.address())\n .field(\"size\", &self.size())\n .finish()\n }\n}\n\nimpl<'data, 'file> read::private::Sealed for Segment<'data, 'file> {}\n\nimpl<'data, 'file> ObjectSegment<'data> for Segment<'data, 'file> {\n fn address(&self) -> u64 {\n with_inner!(self.inner, SegmentInternal, |x| x.address())\n }\n\n fn size(&self) -> u64 {\n with_inner!(self.inner, SegmentInternal, |x| x.size())\n }\n\n fn align(&self) -> u64 {\n with_inner!(self.inner, SegmentInternal, |x| x.align())\n }\n\n fn file_range(&self) -> (u64, u64) {\n with_inner!(self.inner, SegmentInternal, |x| x.file_range())\n }\n\n fn data(&self) -> Result<&'data [u8]> {\n with_inner!(self.inner, SegmentInternal, |x| x.data())\n }\n\n fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {\n with_inner!(self.inner, SegmentInternal, |x| x.data_range(address, size))\n }\n\n fn name(&self) -> Result<Option<&str>> {\n with_inner!(self.inner, SegmentInternal, |x| x.name())\n }\n}\n\n/// An iterator of the sections of a `File`.\n#[derive(Debug)]\npub struct SectionIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SectionIteratorInternal<'data, 'file>,\n}\n\n// we wrap our enums in a struct so that they are kept private.\n#[derive(Debug)]\nenum SectionIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSectionIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSectionIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSectionIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSectionIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSectionIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeSectionIterator32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeSectionIterator64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSectionIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for SectionIterator<'data, 'file> {\n type Item = Section<'data, 'file>;\n\n fn next(&mut self) -> Option<Self::Item> {\n next_inner!(self.inner, SectionIteratorInternal, SectionInternal)\n .map(|inner| Section { inner })\n }\n}\n\n/// A Section of a File\npub struct Section<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SectionInternal<'data, 'file>,\n}\n\nenum SectionInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSection<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSection32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSection64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSection32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSection64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeSection32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeSection64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSection<'data, 'file>),\n}\n\nimpl<'data, 'file> fmt::Debug for Section<'data, 'file> {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n // It's painful to do much better than this\n let mut s = f.debug_struct(\"Section\");\n match self.segment_name() {\n Ok(Some(ref name)) => {\n s.field(\"segment\", name);\n }\n Ok(None) => {}\n Err(_) => {\n s.field(\"segment\", &\"<invalid>\");\n }\n }\n s.field(\"name\", &self.name().unwrap_or(\"<invalid>\"))\n .field(\"address\", &self.address())\n .field(\"size\", &self.size())\n .field(\"align\", &self.align())\n .field(\"kind\", &self.kind())\n .field(\"flags\", &self.flags())\n .finish()\n }\n}\n\nimpl<'data, 'file> read::private::Sealed for Section<'data, 'file> {}\n\nimpl<'data, 'file> ObjectSection<'data> for Section<'data, 'file> {\n type RelocationIterator = SectionRelocationIterator<'data, 'file>;\n\n fn index(&self) -> SectionIndex {\n with_inner!(self.inner, SectionInternal, |x| x.index())\n }\n\n fn address(&self) -> u64 {\n with_inner!(self.inner, SectionInternal, |x| x.address())\n }\n\n fn size(&self) -> u64 {\n with_inner!(self.inner, SectionInternal, |x| x.size())\n }\n\n fn align(&self) -> u64 {\n with_inner!(self.inner, SectionInternal, |x| x.align())\n }\n\n fn file_range(&self) -> Option<(u64, u64)> {\n with_inner!(self.inner, SectionInternal, |x| x.file_range())\n }\n\n fn data(&self) -> Result<&'data [u8]> {\n with_inner!(self.inner, SectionInternal, |x| x.data())\n }\n\n fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {\n with_inner!(self.inner, SectionInternal, |x| x.data_range(address, size))\n }\n\n fn compressed_data(&self) -> Result<CompressedData<'data>> {\n with_inner!(self.inner, SectionInternal, |x| x.compressed_data())\n }\n\n fn name(&self) -> Result<&str> {\n with_inner!(self.inner, SectionInternal, |x| x.name())\n }\n\n fn segment_name(&self) -> Result<Option<&str>> {\n with_inner!(self.inner, SectionInternal, |x| x.segment_name())\n }\n\n fn kind(&self) -> SectionKind {\n with_inner!(self.inner, SectionInternal, |x| x.kind())\n }\n\n fn relocations(&self) -> SectionRelocationIterator<'data, 'file> {\n SectionRelocationIterator {\n inner: map_inner!(\n self.inner,\n SectionInternal,\n SectionRelocationIteratorInternal,\n |x| x.relocations()\n ),\n }\n }\n\n fn flags(&self) -> SectionFlags {\n with_inner!(self.inner, SectionInternal, |x| x.flags())\n }\n}\n\n/// An iterator of the COMDAT section groups of a `File`.\n#[derive(Debug)]\npub struct ComdatIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: ComdatIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum ComdatIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffComdatIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfComdatIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfComdatIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOComdatIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOComdatIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeComdatIterator32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeComdatIterator64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmComdatIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for ComdatIterator<'data, 'file> {\n type Item = Comdat<'data, 'file>;\n\n fn next(&mut self) -> Option<Self::Item> {\n next_inner!(self.inner, ComdatIteratorInternal, ComdatInternal)\n .map(|inner| Comdat { inner })\n }\n}\n\n/// A COMDAT section group of a `File`.\npub struct Comdat<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: ComdatInternal<'data, 'file>,\n}\n\nenum ComdatInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffComdat<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfComdat32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfComdat64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOComdat32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOComdat64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeComdat32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeComdat64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmComdat<'data, 'file>),\n}\n\nimpl<'data, 'file> fmt::Debug for Comdat<'data, 'file> {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let mut s = f.debug_struct(\"Comdat\");\n s.field(\"symbol\", &self.symbol())\n .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))\n .field(\"kind\", &self.kind())\n .finish()\n }\n}\n\nimpl<'data, 'file> read::private::Sealed for Comdat<'data, 'file> {}\n\nimpl<'data, 'file> ObjectComdat<'data> for Comdat<'data, 'file> {\n type SectionIterator = ComdatSectionIterator<'data, 'file>;\n\n fn kind(&self) -> ComdatKind {\n with_inner!(self.inner, ComdatInternal, |x| x.kind())\n }\n\n fn symbol(&self) -> SymbolIndex {\n with_inner!(self.inner, ComdatInternal, |x| x.symbol())\n }\n\n fn name(&self) -> Result<&str> {\n with_inner!(self.inner, ComdatInternal, |x| x.name())\n }\n\n fn sections(&self) -> ComdatSectionIterator<'data, 'file> {\n ComdatSectionIterator {\n inner: map_inner!(\n self.inner,\n ComdatInternal,\n ComdatSectionIteratorInternal,\n |x| x.sections()\n ),\n }\n }\n}\n\n/// An iterator over COMDAT section entries.\n#[derive(Debug)]\npub struct ComdatSectionIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: ComdatSectionIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum ComdatSectionIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffComdatSectionIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfComdatSectionIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfComdatSectionIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOComdatSectionIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOComdatSectionIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeComdatSectionIterator32<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeComdatSectionIterator64<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmComdatSectionIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for ComdatSectionIterator<'data, 'file> {\n type Item = SectionIndex;\n\n fn next(&mut self) -> Option<Self::Item> {\n with_inner_mut!(self.inner, ComdatSectionIteratorInternal, |x| x.next())\n }\n}\n\n/// A symbol table.\n#[derive(Debug)]\npub struct SymbolTable<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SymbolTableInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SymbolTableInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSymbolTable<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSymbolTable32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSymbolTable64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSymbolTable32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSymbolTable64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(coff::CoffSymbolTable<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(coff::CoffSymbolTable<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSymbolTable<'data, 'file>),\n}\n\nimpl<'data, 'file> read::private::Sealed for SymbolTable<'data, 'file> {}\n\nimpl<'data, 'file> ObjectSymbolTable<'data> for SymbolTable<'data, 'file> {\n type Symbol = Symbol<'data, 'file>;\n type SymbolIterator = SymbolIterator<'data, 'file>;\n\n fn symbols(&self) -> Self::SymbolIterator {\n SymbolIterator {\n inner: map_inner!(\n self.inner,\n SymbolTableInternal,\n SymbolIteratorInternal,\n |x| x.symbols()\n ),\n }\n }\n\n fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol> {\n map_inner_option!(self.inner, SymbolTableInternal, SymbolInternal, |x| x\n .symbol_by_index(index))\n .map(|inner| Symbol { inner })\n }\n}\n\n/// An iterator over symbol table entries.\n#[derive(Debug)]\npub struct SymbolIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SymbolIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SymbolIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSymbolIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSymbolIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSymbolIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSymbolIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSymbolIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(coff::CoffSymbolIterator<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(coff::CoffSymbolIterator<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSymbolIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for SymbolIterator<'data, 'file> {\n type Item = Symbol<'data, 'file>;\n\n fn next(&mut self) -> Option<Self::Item> {\n next_inner!(self.inner, SymbolIteratorInternal, SymbolInternal)\n .map(|inner| Symbol { inner })\n }\n}\n\n/// A symbol table entry.\npub struct Symbol<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SymbolInternal<'data, 'file>,\n}\n\nenum SymbolInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffSymbol<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSymbol32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSymbol64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachOSymbol32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachOSymbol64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(coff::CoffSymbol<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(coff::CoffSymbol<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmSymbol<'data, 'file>),\n}\n\nimpl<'data, 'file> fmt::Debug for Symbol<'data, 'file> {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n f.debug_struct(\"Symbol\")\n .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))\n .field(\"address\", &self.address())\n .field(\"size\", &self.size())\n .field(\"kind\", &self.kind())\n .field(\"section\", &self.section())\n .field(\"scope\", &self.scope())\n .field(\"weak\", &self.is_weak())\n .field(\"flags\", &self.flags())\n .finish()\n }\n}\n\nimpl<'data, 'file> read::private::Sealed for Symbol<'data, 'file> {}\n\nimpl<'data, 'file> ObjectSymbol<'data> for Symbol<'data, 'file> {\n fn index(&self) -> SymbolIndex {\n with_inner!(self.inner, SymbolInternal, |x| x.index())\n }\n\n fn name(&self) -> Result<&'data str> {\n with_inner!(self.inner, SymbolInternal, |x| x.name())\n }\n\n fn address(&self) -> u64 {\n with_inner!(self.inner, SymbolInternal, |x| x.address())\n }\n\n fn size(&self) -> u64 {\n with_inner!(self.inner, SymbolInternal, |x| x.size())\n }\n\n fn kind(&self) -> SymbolKind {\n with_inner!(self.inner, SymbolInternal, |x| x.kind())\n }\n\n fn section(&self) -> SymbolSection {\n with_inner!(self.inner, SymbolInternal, |x| x.section())\n }\n\n fn is_undefined(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_undefined())\n }\n\n fn is_definition(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_definition())\n }\n\n fn is_common(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_common())\n }\n\n fn is_weak(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_weak())\n }\n\n fn scope(&self) -> SymbolScope {\n with_inner!(self.inner, SymbolInternal, |x| x.scope())\n }\n\n fn is_global(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_global())\n }\n\n fn is_local(&self) -> bool {\n with_inner!(self.inner, SymbolInternal, |x| x.is_local())\n }\n\n fn flags(&self) -> SymbolFlags<SectionIndex> {\n with_inner!(self.inner, SymbolInternal, |x| x.flags())\n }\n}\n\n/// An iterator over dynamic relocation entries.\n#[derive(Debug)]\npub struct DynamicRelocationIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: DynamicRelocationIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum DynamicRelocationIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfDynamicRelocationIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfDynamicRelocationIterator64<'data, 'file>),\n // We need to always use the lifetime parameters.\n #[allow(unused)]\n None(PhantomData<(&'data (), &'file ())>),\n}\n\nimpl<'data, 'file> Iterator for DynamicRelocationIterator<'data, 'file> {\n type Item = (u64, Relocation);\n\n fn next(&mut self) -> Option<Self::Item> {\n match self.inner {\n #[cfg(feature = \"elf\")]\n DynamicRelocationIteratorInternal::Elf32(ref mut elf) => elf.next(),\n #[cfg(feature = \"elf\")]\n DynamicRelocationIteratorInternal::Elf64(ref mut elf) => elf.next(),\n DynamicRelocationIteratorInternal::None(_) => None,\n }\n }\n}\n\n/// An iterator over section relocation entries.\n#[derive(Debug)]\npub struct SectionRelocationIterator<'data, 'file>\nwhere\n 'data: 'file,\n{\n inner: SectionRelocationIteratorInternal<'data, 'file>,\n}\n\n#[derive(Debug)]\nenum SectionRelocationIteratorInternal<'data, 'file>\nwhere\n 'data: 'file,\n{\n #[cfg(feature = \"coff\")]\n Coff(coff::CoffRelocationIterator<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf32(elf::ElfSectionRelocationIterator32<'data, 'file>),\n #[cfg(feature = \"elf\")]\n Elf64(elf::ElfSectionRelocationIterator64<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO32(macho::MachORelocationIterator32<'data, 'file>),\n #[cfg(feature = \"macho\")]\n MachO64(macho::MachORelocationIterator64<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe32(pe::PeRelocationIterator<'data, 'file>),\n #[cfg(feature = \"pe\")]\n Pe64(pe::PeRelocationIterator<'data, 'file>),\n #[cfg(feature = \"wasm\")]\n Wasm(wasm::WasmRelocationIterator<'data, 'file>),\n}\n\nimpl<'data, 'file> Iterator for SectionRelocationIterator<'data, 'file> {\n type Item = (u64, Relocation);\n\n fn next(&mut self) -> Option<Self::Item> {\n with_inner_mut!(self.inner, SectionRelocationIteratorInternal, |x| x.next())\n }\n}\n","uri":"file:///mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs","version":0}}}
11:30:17 DEBUG unnamed src/language_client.rs:108 state.inlay_hints./mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs: null ==> []
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"method": "languageClient/handleCursorMoved", "jsonrpc": "2.0", "params": {"bufnr": 2, "viewport": {"end": 207, "start": 140}, "languageId": "rust", "buftype": "", "position": {"character": 11, "line": 173}, "filename": "/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}}
11:30:18 INFO unnamed src/language_server_protocol.rs:2873 handle_cursor_moved; params=Object({"bufnr": Number(2), "buftype": String(""), "filename": String("/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "languageId": String("rust"), "position": Object({"character": Number(11), "line": Number(173)}), "viewport": Object({"end": Number(207), "start": Number(140)})}) force_redraw=false
11:30:18 DEBUG reader-Some("rust") src/rpcclient.rs:207 <= Some("rust") {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs","diagnostics":[],"version":0}}
11:30:18 INFO unnamed src/language_server_protocol.rs:2095 text_document_publish_diagnostics; params=Object({"diagnostics": Array([]), "uri": String("file:///mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "version": Number(0)})
11:30:18 DEBUG unnamed src/language_client.rs:108 state.diagnostics./mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs: null ==> []
11:30:18 INFO unnamed src/vim.rs:225 Begin setqflist
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setqflist","params":[[{"col":5,"filename":"/mnt/home/wantlord/develop/study/languageclienttest/src/main.rs","lnum":2,"nr":"unresolved-import","text":"unresolved import","type":"E"}],"r"]}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setqflist","params":[[],"a",{"title":"[LC]: diagnostics"}]}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["bufnr('/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs')"],"id":27}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 27, "jsonrpc": "2.0", "result": 2}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"setbufvar","params":["/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs","LanguageClient_statusLineDiagnosticsCounts",{"E":0,"H":0,"I":0,"W":0}]}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#filename()"],"id":28}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 28, "jsonrpc": "2.0", "result": "/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}
11:30:18 DEBUG unnamed src/language_client.rs:108 state.highlights./mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs: null ==> []
11:30:18 INFO unnamed src/language_server_protocol.rs:2873 handle_cursor_moved; params=Null force_redraw=true
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#filename()"],"id":29}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 29, "jsonrpc": "2.0", "result": "/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"getbufvar","params":["/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs","&filetype"],"id":30}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 30, "jsonrpc": "2.0", "result": "rust"}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#position()"],"id":31}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 31, "jsonrpc": "2.0", "result": {"character": 11, "line": 173}}
11:30:18 DEBUG unnamed src/language_client.rs:108 state.last_cursor_line: 17 ==> 173
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#viewport()"],"id":32}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 32, "jsonrpc": "2.0", "result": {"end": 207, "start": 140}}
11:30:18 INFO unnamed src/language_server_protocol.rs:2847 get_signs_to_display; filename="/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs" viewport=Viewport { start: 140, end: 207 }
11:30:18 DEBUG unnamed src/language_client.rs:108 state.viewports./mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs: null ==> {"end":207,"start":140}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:set_signs","params":["/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs",[]],"id":33}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 33, "jsonrpc": "2.0", "result": 0}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:ClearHighlights","params":["__LCN_DIAGNOSTIC_HIGHLIGHT__"]}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#filename()"],"id":34}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 34, "jsonrpc": "2.0", "result": "/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#viewport()"],"id":35}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 35, "jsonrpc": "2.0", "result": {"end": 207, "start": 140}}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["bufnr('/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs')"],"id":36}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 36, "jsonrpc": "2.0", "result": 2}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"mode","params":[],"id":37}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 37, "jsonrpc": "2.0", "result": "n"}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:set_virtual_texts","params":[2,2,140,207,[]],"id":38}
11:30:18 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 38, "jsonrpc": "2.0", "result": 0}
11:30:18 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:ExecuteAutocmd","params":["LanguageClientDiagnosticsChanged"]}
11:30:21 DEBUG reader-None src/rpcclient.rs:207 <= None {"method": "languageClient/handleCursorMoved", "jsonrpc": "2.0", "params": {"bufnr": 2, "viewport": {"end": 207, "start": 140}, "languageId": "rust", "buftype": "", "position": {"character": 36, "line": 174}, "filename": "/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}}
11:30:21 INFO unnamed src/language_server_protocol.rs:2873 handle_cursor_moved; params=Object({"bufnr": Number(2), "buftype": String(""), "filename": String("/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "languageId": String("rust"), "position": Object({"character": Number(36), "line": Number(174)}), "viewport": Object({"end": Number(207), "start": Number(140)})}) force_redraw=false
11:30:21 DEBUG unnamed src/language_client.rs:108 state.last_cursor_line: 173 ==> 174
11:30:21 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 2, "jsonrpc": "2.0", "method": "textDocument/definition", "params": {"bufnr": 2, "character": 36, "handle": true, "languageId": "rust", "gotoCmd": null, "line": 174, "text": ["use alloc::fmt;", "use alloc::vec::Vec;", "use core::marker::PhantomData;", "", "#[cfg(feature = \"coff\")]", "use crate::read::coff;", "#[cfg(feature = \"elf\")]", "use crate::read::elf;", "#[cfg(feature = \"macho\")]", "use crate::read::macho;", "#[cfg(feature = \"pe\")]", "use crate::read::pe;", "#[cfg(feature = \"wasm\")]", "use crate::read::wasm;", "use crate::read::{", " self, Architecture, BinaryFormat, ComdatKind, CompressedData, Error, Export, FileFlags,", " FileKind, Import, Object, ObjectComdat, ObjectMap, ObjectSection, ObjectSegment, ObjectSymbol,", " ObjectSymbolTable, Relocation, Result, SectionFlags, SectionIndex, SectionKind, SymbolFlags,", " SymbolIndex, SymbolKind, SymbolMap, SymbolMapName, SymbolScope, SymbolSection,", "};", "", "/// Evaluate an expression on the contents of a file format enum.", "///", "/// This is a hack to avoid virtual calls.", "macro_rules! with_inner {", " ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $enum::Coff(ref $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf32(ref $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf64(ref $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO32(ref $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO64(ref $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe32(ref $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe64(ref $var) => $body,", " #[cfg(feature = \"wasm\")]", " $enum::Wasm(ref $var) => $body,", " }", " };", "}", "", "macro_rules! with_inner_mut {", " ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $enum::Coff(ref mut $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf32(ref mut $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf64(ref mut $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO32(ref mut $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO64(ref mut $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe32(ref mut $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe64(ref mut $var) => $body,", " #[cfg(feature = \"wasm\")]", " $enum::Wasm(ref mut $var) => $body,", " }", " };", "}", "", "/// Like `with_inner!`, but wraps the result in another enum.", "macro_rules! map_inner {", " ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $from::Coff(ref $var) => $to::Coff($body),", " #[cfg(feature = \"elf\")]", " $from::Elf32(ref $var) => $to::Elf32($body),", " #[cfg(feature = \"elf\")]", " $from::Elf64(ref $var) => $to::Elf64($body),", " #[cfg(feature = \"macho\")]", " $from::MachO32(ref $var) => $to::MachO32($body),", " #[cfg(feature = \"macho\")]", " $from::MachO64(ref $var) => $to::MachO64($body),", " #[cfg(feature = \"pe\")]", " $from::Pe32(ref $var) => $to::Pe32($body),", " #[cfg(feature = \"pe\")]", " $from::Pe64(ref $var) => $to::Pe64($body),", " #[cfg(feature = \"wasm\")]", " $from::Wasm(ref $var) => $to::Wasm($body),", " }", " };", "}", "", "/// Like `map_inner!`, but the result is a Result or Option.", "macro_rules! map_inner_option {", " ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $from::Coff(ref $var) => $body.map($to::Coff),", " #[cfg(feature = \"elf\")]", " $from::Elf32(ref $var) => $body.map($to::Elf32),", " #[cfg(feature = \"elf\")]", " $from::Elf64(ref $var) => $body.map($to::Elf64),", " #[cfg(feature = \"macho\")]", " $from::MachO32(ref $var) => $body.map($to::MachO32),", " #[cfg(feature = \"macho\")]", " $from::MachO64(ref $var) => $body.map($to::MachO64),", " #[cfg(feature = \"pe\")]", " $from::Pe32(ref $var) => $body.map($to::Pe32),", " #[cfg(feature = \"pe\")]", " $from::Pe64(ref $var) => $body.map($to::Pe64),", " #[cfg(feature = \"wasm\")]", " $from::Wasm(ref $var) => $body.map($to::Wasm),", " }", " };", "}", "", "/// Call `next` for a file format iterator.", "macro_rules! next_inner {", " ($inner:expr, $from:ident, $to:ident) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $from::Coff(ref mut iter) => iter.next().map($to::Coff),", " #[cfg(feature = \"elf\")]", " $from::Elf32(ref mut iter) => iter.next().map($to::Elf32),", " #[cfg(feature = \"elf\")]", " $from::Elf64(ref mut iter) => iter.next().map($to::Elf64),", " #[cfg(feature = \"macho\")]", " $from::MachO32(ref mut iter) => iter.next().map($to::MachO32),", " #[cfg(feature = \"macho\")]", " $from::MachO64(ref mut iter) => iter.next().map($to::MachO64),", " #[cfg(feature = \"pe\")]", " $from::Pe32(ref mut iter) => iter.next().map($to::Pe32),", " #[cfg(feature = \"pe\")]", " $from::Pe64(ref mut iter) => iter.next().map($to::Pe64),", " #[cfg(feature = \"wasm\")]", " $from::Wasm(ref mut iter) => iter.next().map($to::Wasm),", " }", " };", "}", "", "/// An object file.", "///", "/// Most functionality is provided by the `Object` trait implementation.", "#[derive(Debug)]", "pub struct File<'data> {", " inner: FileInternal<'data>,", "}", "", "#[allow(clippy::large_enum_variant)]", "#[derive(Debug)]", "enum FileInternal<'data> {", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffFile<'data>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfFile32<'data>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfFile64<'data>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOFile32<'data>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOFile64<'data>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeFile32<'data>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeFile64<'data>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmFile<'data>),", "}", "", "impl<'data> File<'data> {", " /// Parse the raw file data.", " pub fn parse(data: &'data [u8]) -> Result<Self> {", " let inner = match FileKind::parse(data)? {", " #[cfg(feature = \"elf\")]", " FileKind::Elf32 => FileInternal::Elf32(elf::ElfFile32::parse(data)?),", " #[cfg(feature = \"elf\")]", " FileKind::Elf64 => FileInternal::Elf64(elf::ElfFile64::parse(data)?),", " #[cfg(feature = \"macho\")]", " FileKind::MachO32 => FileInternal::MachO32(macho::MachOFile32::parse(data)?),", " #[cfg(feature = \"macho\")]", " FileKind::MachO64 => FileInternal::MachO64(macho::MachOFile64::parse(data)?),", " #[cfg(feature = \"wasm\")]", " FileKind::Wasm => FileInternal::Wasm(wasm::WasmFile::parse(data)?),", " #[cfg(feature = \"pe\")]", " FileKind::Pe32 => FileInternal::Pe32(pe::PeFile32::parse(data)?),", " #[cfg(feature = \"pe\")]", " FileKind::Pe64 => FileInternal::Pe64(pe::PeFile64::parse(data)?),", " #[cfg(feature = \"coff\")]", " FileKind::Coff => FileInternal::Coff(coff::CoffFile::parse(data)?),", " _ => return Err(Error(\"Unsupported file format\")),", " };", " Ok(File { inner })", " }", "", " /// Return the file format.", " pub fn format(&self) -> BinaryFormat {", " match self.inner {", " #[cfg(feature = \"coff\")]", " FileInternal::Coff(_) => BinaryFormat::Coff,", " #[cfg(feature = \"elf\")]", " FileInternal::Elf32(_) | FileInternal::Elf64(_) => BinaryFormat::Elf,", " #[cfg(feature = \"macho\")]", " FileInternal::MachO32(_) | FileInternal::MachO64(_) => BinaryFormat::MachO,", " #[cfg(feature = \"pe\")]", " FileInternal::Pe32(_) | FileInternal::Pe64(_) => BinaryFormat::Pe,", " #[cfg(feature = \"wasm\")]", " FileInternal::Wasm(_) => BinaryFormat::Wasm,", " }", " }", "}", "", "impl<'data> read::private::Sealed for File<'data> {}", "", "impl<'data, 'file> Object<'data, 'file> for File<'data>", "where", " 'data: 'file,", "{", " type Segment = Segment<'data, 'file>;", " type SegmentIterator = SegmentIterator<'data, 'file>;", " type Section = Section<'data, 'file>;", " type SectionIterator = SectionIterator<'data, 'file>;", " type Comdat = Comdat<'data, 'file>;", " type ComdatIterator = ComdatIterator<'data, 'file>;", " type Symbol = Symbol<'data, 'file>;", " type SymbolIterator = SymbolIterator<'data, 'file>;", " type SymbolTable = SymbolTable<'data, 'file>;", " type DynamicRelocationIterator = DynamicRelocationIterator<'data, 'file>;", "", " fn architecture(&self) -> Architecture {", " with_inner!(self.inner, FileInternal, |x| x.architecture())", " }", "", " fn is_little_endian(&self) -> bool {", " with_inner!(self.inner, FileInternal, |x| x.is_little_endian())", " }", "", " fn is_64(&self) -> bool {", " with_inner!(self.inner, FileInternal, |x| x.is_64())", " }", "", " fn segments(&'file self) -> SegmentIterator<'data, 'file> {", " SegmentIterator {", " inner: map_inner!(self.inner, FileInternal, SegmentIteratorInternal, |x| x", " .segments()),", " }", " }", "", " fn section_by_name(&'file self, section_name: &str) -> Option<Section<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x", " .section_by_name(section_name))", " .map(|inner| Section { inner })", " }", "", " fn section_by_index(&'file self, index: SectionIndex) -> Result<Section<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x", " .section_by_index(index))", " .map(|inner| Section { inner })", " }", "", " fn sections(&'file self) -> SectionIterator<'data, 'file> {", " SectionIterator {", " inner: map_inner!(self.inner, FileInternal, SectionIteratorInternal, |x| x", " .sections()),", " }", " }", "", " fn comdats(&'file self) -> ComdatIterator<'data, 'file> {", " ComdatIterator {", " inner: map_inner!(self.inner, FileInternal, ComdatIteratorInternal, |x| x", " .comdats()),", " }", " }", "", " fn symbol_by_index(&'file self, index: SymbolIndex) -> Result<Symbol<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SymbolInternal, |x| x", " .symbol_by_index(index))", " .map(|inner| Symbol { inner })", " }", "", " fn symbols(&'file self) -> SymbolIterator<'data, 'file> {", " SymbolIterator {", " inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x", " .symbols()),", " }", " }", "", " fn symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x", " .symbol_table())", " .map(|inner| SymbolTable { inner })", " }", "", " fn dynamic_symbols(&'file self) -> SymbolIterator<'data, 'file> {", " SymbolIterator {", " inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x", " .dynamic_symbols()),", " }", " }", "", " fn dynamic_symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x", " .dynamic_symbol_table())", " .map(|inner| SymbolTable { inner })", " }", "", " #[cfg(feature = \"elf\")]", " fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {", " let inner = match self.inner {", " FileInternal::Elf32(ref elf) => {", " DynamicRelocationIteratorInternal::Elf32(elf.dynamic_relocations()?)", " }", " FileInternal::Elf64(ref elf) => {", " DynamicRelocationIteratorInternal::Elf64(elf.dynamic_relocations()?)", " }", " _ => return None,", " };", " Some(DynamicRelocationIterator { inner })", " }", "", " #[cfg(not(feature = \"elf\"))]", " fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {", " None", " }", "", " fn symbol_map(&self) -> SymbolMap<SymbolMapName<'data>> {", " with_inner!(self.inner, FileInternal, |x| x.symbol_map())", " }", "", " fn object_map(&self) -> ObjectMap<'data> {", " with_inner!(self.inner, FileInternal, |x| x.object_map())", " }", "", " fn imports(&self) -> Result<Vec<Import<'data>>> {", " with_inner!(self.inner, FileInternal, |x| x.imports())", " }", "", " fn exports(&self) -> Result<Vec<Export<'data>>> {", " with_inner!(self.inner, FileInternal, |x| x.exports())", " }", "", " fn has_debug_symbols(&self) -> bool {", " with_inner!(self.inner, FileInternal, |x| x.has_debug_symbols())", " }", "", " #[inline]", " fn mach_uuid(&self) -> Result<Option<[u8; 16]>> {", " with_inner!(self.inner, FileInternal, |x| x.mach_uuid())", " }", "", " #[inline]", " fn build_id(&self) -> Result<Option<&'data [u8]>> {", " with_inner!(self.inner, FileInternal, |x| x.build_id())", " }", "", " #[inline]", " fn gnu_debuglink(&self) -> Result<Option<(&'data [u8], u32)>> {", " with_inner!(self.inner, FileInternal, |x| x.gnu_debuglink())", " }", "", " fn entry(&self) -> u64 {", " with_inner!(self.inner, FileInternal, |x| x.entry())", " }", "", " fn flags(&self) -> FileFlags {", " with_inner!(self.inner, FileInternal, |x| x.flags())", " }", "}", "", "/// An iterator over the segments of a `File`.", "#[derive(Debug)]", "pub struct SegmentIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SegmentIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SegmentIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSegmentIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSegmentIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSegmentIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSegmentIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSegmentIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSegmentIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSegmentIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSegmentIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SegmentIterator<'data, 'file> {", " type Item = Segment<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, SegmentIteratorInternal, SegmentInternal)", " .map(|inner| Segment { inner })", " }", "}", "", "/// A segment of a `File`.", "pub struct Segment<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SegmentInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SegmentInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSegment<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSegment32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSegment64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSegment32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSegment64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSegment32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSegment64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSegment<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Segment<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " // It's painful to do much better than this", " let mut s = f.debug_struct(\"Segment\");", " match self.name() {", " Ok(Some(ref name)) => {", " s.field(\"name\", name);", " }", " Ok(None) => {}", " Err(_) => {", " s.field(\"name\", &\"<invalid>\");", " }", " }", " s.field(\"address\", &self.address())", " .field(\"size\", &self.size())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Segment<'data, 'file> {}", "", "impl<'data, 'file> ObjectSegment<'data> for Segment<'data, 'file> {", " fn address(&self) -> u64 {", " with_inner!(self.inner, SegmentInternal, |x| x.address())", " }", "", " fn size(&self) -> u64 {", " with_inner!(self.inner, SegmentInternal, |x| x.size())", " }", "", " fn align(&self) -> u64 {", " with_inner!(self.inner, SegmentInternal, |x| x.align())", " }", "", " fn file_range(&self) -> (u64, u64) {", " with_inner!(self.inner, SegmentInternal, |x| x.file_range())", " }", "", " fn data(&self) -> Result<&'data [u8]> {", " with_inner!(self.inner, SegmentInternal, |x| x.data())", " }", "", " fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {", " with_inner!(self.inner, SegmentInternal, |x| x.data_range(address, size))", " }", "", " fn name(&self) -> Result<Option<&str>> {", " with_inner!(self.inner, SegmentInternal, |x| x.name())", " }", "}", "", "/// An iterator of the sections of a `File`.", "#[derive(Debug)]", "pub struct SectionIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SectionIteratorInternal<'data, 'file>,", "}", "", "// we wrap our enums in a struct so that they are kept private.", "#[derive(Debug)]", "enum SectionIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSectionIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSectionIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSectionIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSectionIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSectionIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSectionIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSectionIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSectionIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SectionIterator<'data, 'file> {", " type Item = Section<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, SectionIteratorInternal, SectionInternal)", " .map(|inner| Section { inner })", " }", "}", "", "/// A Section of a File", "pub struct Section<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SectionInternal<'data, 'file>,", "}", "", "enum SectionInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSection<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSection32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSection64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSection32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSection64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSection32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSection64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSection<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Section<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " // It's painful to do much better than this", " let mut s = f.debug_struct(\"Section\");", " match self.segment_name() {", " Ok(Some(ref name)) => {", " s.field(\"segment\", name);", " }", " Ok(None) => {}", " Err(_) => {", " s.field(\"segment\", &\"<invalid>\");", " }", " }", " s.field(\"name\", &self.name().unwrap_or(\"<invalid>\"))", " .field(\"address\", &self.address())", " .field(\"size\", &self.size())", " .field(\"align\", &self.align())", " .field(\"kind\", &self.kind())", " .field(\"flags\", &self.flags())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Section<'data, 'file> {}", "", "impl<'data, 'file> ObjectSection<'data> for Section<'data, 'file> {", " type RelocationIterator = SectionRelocationIterator<'data, 'file>;", "", " fn index(&self) -> SectionIndex {", " with_inner!(self.inner, SectionInternal, |x| x.index())", " }", "", " fn address(&self) -> u64 {", " with_inner!(self.inner, SectionInternal, |x| x.address())", " }", "", " fn size(&self) -> u64 {", " with_inner!(self.inner, SectionInternal, |x| x.size())", " }", "", " fn align(&self) -> u64 {", " with_inner!(self.inner, SectionInternal, |x| x.align())", " }", "", " fn file_range(&self) -> Option<(u64, u64)> {", " with_inner!(self.inner, SectionInternal, |x| x.file_range())", " }", "", " fn data(&self) -> Result<&'data [u8]> {", " with_inner!(self.inner, SectionInternal, |x| x.data())", " }", "", " fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {", " with_inner!(self.inner, SectionInternal, |x| x.data_range(address, size))", " }", "", " fn compressed_data(&self) -> Result<CompressedData<'data>> {", " with_inner!(self.inner, SectionInternal, |x| x.compressed_data())", " }", "", " fn name(&self) -> Result<&str> {", " with_inner!(self.inner, SectionInternal, |x| x.name())", " }", "", " fn segment_name(&self) -> Result<Option<&str>> {", " with_inner!(self.inner, SectionInternal, |x| x.segment_name())", " }", "", " fn kind(&self) -> SectionKind {", " with_inner!(self.inner, SectionInternal, |x| x.kind())", " }", "", " fn relocations(&self) -> SectionRelocationIterator<'data, 'file> {", " SectionRelocationIterator {", " inner: map_inner!(", " self.inner,", " SectionInternal,", " SectionRelocationIteratorInternal,", " |x| x.relocations()", " ),", " }", " }", "", " fn flags(&self) -> SectionFlags {", " with_inner!(self.inner, SectionInternal, |x| x.flags())", " }", "}", "", "/// An iterator of the COMDAT section groups of a `File`.", "#[derive(Debug)]", "pub struct ComdatIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: ComdatIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum ComdatIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffComdatIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfComdatIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfComdatIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOComdatIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOComdatIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeComdatIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeComdatIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmComdatIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for ComdatIterator<'data, 'file> {", " type Item = Comdat<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, ComdatIteratorInternal, ComdatInternal)", " .map(|inner| Comdat { inner })", " }", "}", "", "/// A COMDAT section group of a `File`.", "pub struct Comdat<'data, 'file>", "where", " 'data: 'file,", "{", " inner: ComdatInternal<'data, 'file>,", "}", "", "enum ComdatInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffComdat<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfComdat32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfComdat64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOComdat32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOComdat64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeComdat32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeComdat64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmComdat<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Comdat<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " let mut s = f.debug_struct(\"Comdat\");", " s.field(\"symbol\", &self.symbol())", " .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))", " .field(\"kind\", &self.kind())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Comdat<'data, 'file> {}", "", "impl<'data, 'file> ObjectComdat<'data> for Comdat<'data, 'file> {", " type SectionIterator = ComdatSectionIterator<'data, 'file>;", "", " fn kind(&self) -> ComdatKind {", " with_inner!(self.inner, ComdatInternal, |x| x.kind())", " }", "", " fn symbol(&self) -> SymbolIndex {", " with_inner!(self.inner, ComdatInternal, |x| x.symbol())", " }", "", " fn name(&self) -> Result<&str> {", " with_inner!(self.inner, ComdatInternal, |x| x.name())", " }", "", " fn sections(&self) -> ComdatSectionIterator<'data, 'file> {", " ComdatSectionIterator {", " inner: map_inner!(", " self.inner,", " ComdatInternal,", " ComdatSectionIteratorInternal,", " |x| x.sections()", " ),", " }", " }", "}", "", "/// An iterator over COMDAT section entries.", "#[derive(Debug)]", "pub struct ComdatSectionIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: ComdatSectionIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum ComdatSectionIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffComdatSectionIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfComdatSectionIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfComdatSectionIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOComdatSectionIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOComdatSectionIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeComdatSectionIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeComdatSectionIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmComdatSectionIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for ComdatSectionIterator<'data, 'file> {", " type Item = SectionIndex;", "", " fn next(&mut self) -> Option<Self::Item> {", " with_inner_mut!(self.inner, ComdatSectionIteratorInternal, |x| x.next())", " }", "}", "", "/// A symbol table.", "#[derive(Debug)]", "pub struct SymbolTable<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SymbolTableInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SymbolTableInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSymbolTable<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSymbolTable32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSymbolTable64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSymbolTable32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSymbolTable64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(coff::CoffSymbolTable<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(coff::CoffSymbolTable<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSymbolTable<'data, 'file>),", "}", "", "impl<'data, 'file> read::private::Sealed for SymbolTable<'data, 'file> {}", "", "impl<'data, 'file> ObjectSymbolTable<'data> for SymbolTable<'data, 'file> {", " type Symbol = Symbol<'data, 'file>;", " type SymbolIterator = SymbolIterator<'data, 'file>;", "", " fn symbols(&self) -> Self::SymbolIterator {", " SymbolIterator {", " inner: map_inner!(", " self.inner,", " SymbolTableInternal,", " SymbolIteratorInternal,", " |x| x.symbols()", " ),", " }", " }", "", " fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol> {", " map_inner_option!(self.inner, SymbolTableInternal, SymbolInternal, |x| x", " .symbol_by_index(index))", " .map(|inner| Symbol { inner })", " }", "}", "", "/// An iterator over symbol table entries.", "#[derive(Debug)]", "pub struct SymbolIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SymbolIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SymbolIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSymbolIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSymbolIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSymbolIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSymbolIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSymbolIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(coff::CoffSymbolIterator<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(coff::CoffSymbolIterator<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSymbolIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SymbolIterator<'data, 'file> {", " type Item = Symbol<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, SymbolIteratorInternal, SymbolInternal)", " .map(|inner| Symbol { inner })", " }", "}", "", "/// A symbol table entry.", "pub struct Symbol<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SymbolInternal<'data, 'file>,", "}", "", "enum SymbolInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSymbol<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSymbol32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSymbol64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSymbol32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSymbol64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(coff::CoffSymbol<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(coff::CoffSymbol<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSymbol<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Symbol<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " f.debug_struct(\"Symbol\")", " .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))", " .field(\"address\", &self.address())", " .field(\"size\", &self.size())", " .field(\"kind\", &self.kind())", " .field(\"section\", &self.section())", " .field(\"scope\", &self.scope())", " .field(\"weak\", &self.is_weak())", " .field(\"flags\", &self.flags())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Symbol<'data, 'file> {}", "", "impl<'data, 'file> ObjectSymbol<'data> for Symbol<'data, 'file> {", " fn index(&self) -> SymbolIndex {", " with_inner!(self.inner, SymbolInternal, |x| x.index())", " }", "", " fn name(&self) -> Result<&'data str> {", " with_inner!(self.inner, SymbolInternal, |x| x.name())", " }", "", " fn address(&self) -> u64 {", " with_inner!(self.inner, SymbolInternal, |x| x.address())", " }", "", " fn size(&self) -> u64 {", " with_inner!(self.inner, SymbolInternal, |x| x.size())", " }", "", " fn kind(&self) -> SymbolKind {", " with_inner!(self.inner, SymbolInternal, |x| x.kind())", " }", "", " fn section(&self) -> SymbolSection {", " with_inner!(self.inner, SymbolInternal, |x| x.section())", " }", "", " fn is_undefined(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_undefined())", " }", "", " fn is_definition(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_definition())", " }", "", " fn is_common(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_common())", " }", "", " fn is_weak(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_weak())", " }", "", " fn scope(&self) -> SymbolScope {", " with_inner!(self.inner, SymbolInternal, |x| x.scope())", " }", "", " fn is_global(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_global())", " }", "", " fn is_local(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_local())", " }", "", " fn flags(&self) -> SymbolFlags<SectionIndex> {", " with_inner!(self.inner, SymbolInternal, |x| x.flags())", " }", "}", "", "/// An iterator over dynamic relocation entries.", "#[derive(Debug)]", "pub struct DynamicRelocationIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: DynamicRelocationIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum DynamicRelocationIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfDynamicRelocationIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfDynamicRelocationIterator64<'data, 'file>),", " // We need to always use the lifetime parameters.", " #[allow(unused)]", " None(PhantomData<(&'data (), &'file ())>),", "}", "", "impl<'data, 'file> Iterator for DynamicRelocationIterator<'data, 'file> {", " type Item = (u64, Relocation);", "", " fn next(&mut self) -> Option<Self::Item> {", " match self.inner {", " #[cfg(feature = \"elf\")]", " DynamicRelocationIteratorInternal::Elf32(ref mut elf) => elf.next(),", " #[cfg(feature = \"elf\")]", " DynamicRelocationIteratorInternal::Elf64(ref mut elf) => elf.next(),", " DynamicRelocationIteratorInternal::None(_) => None,", " }", " }", "}", "", "/// An iterator over section relocation entries.", "#[derive(Debug)]", "pub struct SectionRelocationIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SectionRelocationIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SectionRelocationIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffRelocationIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSectionRelocationIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSectionRelocationIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachORelocationIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachORelocationIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeRelocationIterator<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeRelocationIterator<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmRelocationIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SectionRelocationIterator<'data, 'file> {", " type Item = (u64, Relocation);", "", " fn next(&mut self) -> Option<Self::Item> {", " with_inner_mut!(self.inner, SectionRelocationIteratorInternal, |x| x.next())", " }", "}", ""], "filename": "/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}}
11:30:21 INFO unnamed src/language_server_protocol.rs:1473 text_document_definition; params=Object({"bufnr": Number(2), "character": Number(36), "filename": String("/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "gotoCmd": Null, "handle": Bool(true), "languageId": String("rust"), "line": Number(174), "text": Array([String("use alloc::fmt;"), String("use alloc::vec::Vec;"), String("use core::marker::PhantomData;"), String(""), String("#[cfg(feature = \"coff\")]"), String("use crate::read::coff;"), String("#[cfg(feature = \"elf\")]"), String("use crate::read::elf;"), String("#[cfg(feature = \"macho\")]"), String("use crate::read::macho;"), String("#[cfg(feature = \"pe\")]"), String("use crate::read::pe;"), String("#[cfg(feature = \"wasm\")]"), String("use crate::read::wasm;"), String("use crate::read::{"), String(" self, Architecture, BinaryFormat, ComdatKind, CompressedData, Error, Export, FileFlags,"), String(" FileKind, Import, Object, ObjectComdat, ObjectMap, ObjectSection, ObjectSegment, ObjectSymbol,"), String(" ObjectSymbolTable, Relocation, Result, SectionFlags, SectionIndex, SectionKind, SymbolFlags,"), String(" SymbolIndex, SymbolKind, SymbolMap, SymbolMapName, SymbolScope, SymbolSection,"), String("};"), String(""), String("/// Evaluate an expression on the contents of a file format enum."), String("///"), String("/// This is a hack to avoid virtual calls."), String("macro_rules! with_inner {"), String(" ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $enum::Coff(ref $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf32(ref $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf64(ref $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO32(ref $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO64(ref $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe32(ref $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe64(ref $var) => $body,"), String(" #[cfg(feature = \"wasm\")]"), String(" $enum::Wasm(ref $var) => $body,"), String(" }"), String(" };"), String("}"), String(""), String("macro_rules! with_inner_mut {"), String(" ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $enum::Coff(ref mut $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf32(ref mut $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf64(ref mut $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO32(ref mut $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO64(ref mut $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe32(ref mut $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe64(ref mut $var) => $body,"), String(" #[cfg(feature = \"wasm\")]"), String(" $enum::Wasm(ref mut $var) => $body,"), String(" }"), String(" };"), String("}"), String(""), String("/// Like `with_inner!`, but wraps the result in another enum."), String("macro_rules! map_inner {"), String(" ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $from::Coff(ref $var) => $to::Coff($body),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf32(ref $var) => $to::Elf32($body),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf64(ref $var) => $to::Elf64($body),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO32(ref $var) => $to::MachO32($body),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO64(ref $var) => $to::MachO64($body),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe32(ref $var) => $to::Pe32($body),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe64(ref $var) => $to::Pe64($body),"), String(" #[cfg(feature = \"wasm\")]"), String(" $from::Wasm(ref $var) => $to::Wasm($body),"), String(" }"), String(" };"), String("}"), String(""), String("/// Like `map_inner!`, but the result is a Result or Option."), String("macro_rules! map_inner_option {"), String(" ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $from::Coff(ref $var) => $body.map($to::Coff),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf32(ref $var) => $body.map($to::Elf32),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf64(ref $var) => $body.map($to::Elf64),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO32(ref $var) => $body.map($to::MachO32),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO64(ref $var) => $body.map($to::MachO64),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe32(ref $var) => $body.map($to::Pe32),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe64(ref $var) => $body.map($to::Pe64),"), String(" #[cfg(feature = \"wasm\")]"), String(" $from::Wasm(ref $var) => $body.map($to::Wasm),"), String(" }"), String(" };"), String("}"), String(""), String("/// Call `next` for a file format iterator."), String("macro_rules! next_inner {"), String(" ($inner:expr, $from:ident, $to:ident) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $from::Coff(ref mut iter) => iter.next().map($to::Coff),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf32(ref mut iter) => iter.next().map($to::Elf32),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf64(ref mut iter) => iter.next().map($to::Elf64),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO32(ref mut iter) => iter.next().map($to::MachO32),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO64(ref mut iter) => iter.next().map($to::MachO64),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe32(ref mut iter) => iter.next().map($to::Pe32),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe64(ref mut iter) => iter.next().map($to::Pe64),"), String(" #[cfg(feature = \"wasm\")]"), String(" $from::Wasm(ref mut iter) => iter.next().map($to::Wasm),"), String(" }"), String(" };"), String("}"), String(""), String("/// An object file."), String("///"), String("/// Most functionality is provided by the `Object` trait implementation."), String("#[derive(Debug)]"), String("pub struct File<\'data> {"), String(" inner: FileInternal<\'data>,"), String("}"), String(""), String("#[allow(clippy::large_enum_variant)]"), String("#[derive(Debug)]"), String("enum FileInternal<\'data> {"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffFile<\'data>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfFile32<\'data>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfFile64<\'data>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOFile32<\'data>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOFile64<\'data>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeFile32<\'data>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeFile64<\'data>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmFile<\'data>),"), String("}"), String(""), String("impl<\'data> File<\'data> {"), String(" /// Parse the raw file data."), String(" pub fn parse(data: &\'data [u8]) -> Result<Self> {"), String(" let inner = match FileKind::parse(data)? {"), String(" #[cfg(feature = \"elf\")]"), String(" FileKind::Elf32 => FileInternal::Elf32(elf::ElfFile32::parse(data)?),"), String(" #[cfg(feature = \"elf\")]"), String(" FileKind::Elf64 => FileInternal::Elf64(elf::ElfFile64::parse(data)?),"), String(" #[cfg(feature = \"macho\")]"), String(" FileKind::MachO32 => FileInternal::MachO32(macho::MachOFile32::parse(data)?),"), String(" #[cfg(feature = \"macho\")]"), String(" FileKind::MachO64 => FileInternal::MachO64(macho::MachOFile64::parse(data)?),"), String(" #[cfg(feature = \"wasm\")]"), String(" FileKind::Wasm => FileInternal::Wasm(wasm::WasmFile::parse(data)?),"), String(" #[cfg(feature = \"pe\")]"), String(" FileKind::Pe32 => FileInternal::Pe32(pe::PeFile32::parse(data)?),"), String(" #[cfg(feature = \"pe\")]"), String(" FileKind::Pe64 => FileInternal::Pe64(pe::PeFile64::parse(data)?),"), String(" #[cfg(feature = \"coff\")]"), String(" FileKind::Coff => FileInternal::Coff(coff::CoffFile::parse(data)?),"), String(" _ => return Err(Error(\"Unsupported file format\")),"), String(" };"), String(" Ok(File { inner })"), String(" }"), String(""), String(" /// Return the file format."), String(" pub fn format(&self) -> BinaryFormat {"), String(" match self.inner {"), String(" #[cfg(feature = \"coff\")]"), String(" FileInternal::Coff(_) => BinaryFormat::Coff,"), String(" #[cfg(feature = \"elf\")]"), String(" FileInternal::Elf32(_) | FileInternal::Elf64(_) => BinaryFormat::Elf,"), String(" #[cfg(feature = \"macho\")]"), String(" FileInternal::MachO32(_) | FileInternal::MachO64(_) => BinaryFormat::MachO,"), String(" #[cfg(feature = \"pe\")]"), String(" FileInternal::Pe32(_) | FileInternal::Pe64(_) => BinaryFormat::Pe,"), String(" #[cfg(feature = \"wasm\")]"), String(" FileInternal::Wasm(_) => BinaryFormat::Wasm,"), String(" }"), String(" }"), String("}"), String(""), String("impl<\'data> read::private::Sealed for File<\'data> {}"), String(""), String("impl<\'data, \'file> Object<\'data, \'file> for File<\'data>"), String("where"), String(" \'data: \'file,"), String("{"), String(" type Segment = Segment<\'data, \'file>;"), String(" type SegmentIterator = SegmentIterator<\'data, \'file>;"), String(" type Section = Section<\'data, \'file>;"), String(" type SectionIterator = SectionIterator<\'data, \'file>;"), String(" type Comdat = Comdat<\'data, \'file>;"), String(" type ComdatIterator = ComdatIterator<\'data, \'file>;"), String(" type Symbol = Symbol<\'data, \'file>;"), String(" type SymbolIterator = SymbolIterator<\'data, \'file>;"), String(" type SymbolTable = SymbolTable<\'data, \'file>;"), String(" type DynamicRelocationIterator = DynamicRelocationIterator<\'data, \'file>;"), String(""), String(" fn architecture(&self) -> Architecture {"), String(" with_inner!(self.inner, FileInternal, |x| x.architecture())"), String(" }"), String(""), String(" fn is_little_endian(&self) -> bool {"), String(" with_inner!(self.inner, FileInternal, |x| x.is_little_endian())"), String(" }"), String(""), String(" fn is_64(&self) -> bool {"), String(" with_inner!(self.inner, FileInternal, |x| x.is_64())"), String(" }"), String(""), String(" fn segments(&\'file self) -> SegmentIterator<\'data, \'file> {"), String(" SegmentIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SegmentIteratorInternal, |x| x"), String(" .segments()),"), String(" }"), String(" }"), String(""), String(" fn section_by_name(&\'file self, section_name: &str) -> Option<Section<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x"), String(" .section_by_name(section_name))"), String(" .map(|inner| Section { inner })"), String(" }"), String(""), String(" fn section_by_index(&\'file self, index: SectionIndex) -> Result<Section<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x"), String(" .section_by_index(index))"), String(" .map(|inner| Section { inner })"), String(" }"), String(""), String(" fn sections(&\'file self) -> SectionIterator<\'data, \'file> {"), String(" SectionIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SectionIteratorInternal, |x| x"), String(" .sections()),"), String(" }"), String(" }"), String(""), String(" fn comdats(&\'file self) -> ComdatIterator<\'data, \'file> {"), String(" ComdatIterator {"), String(" inner: map_inner!(self.inner, FileInternal, ComdatIteratorInternal, |x| x"), String(" .comdats()),"), String(" }"), String(" }"), String(""), String(" fn symbol_by_index(&\'file self, index: SymbolIndex) -> Result<Symbol<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SymbolInternal, |x| x"), String(" .symbol_by_index(index))"), String(" .map(|inner| Symbol { inner })"), String(" }"), String(""), String(" fn symbols(&\'file self) -> SymbolIterator<\'data, \'file> {"), String(" SymbolIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x"), String(" .symbols()),"), String(" }"), String(" }"), String(""), String(" fn symbol_table(&\'file self) -> Option<SymbolTable<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x"), String(" .symbol_table())"), String(" .map(|inner| SymbolTable { inner })"), String(" }"), String(""), String(" fn dynamic_symbols(&\'file self) -> SymbolIterator<\'data, \'file> {"), String(" SymbolIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x"), String(" .dynamic_symbols()),"), String(" }"), String(" }"), String(""), String(" fn dynamic_symbol_table(&\'file self) -> Option<SymbolTable<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x"), String(" .dynamic_symbol_table())"), String(" .map(|inner| SymbolTable { inner })"), String(" }"), String(""), String(" #[cfg(feature = \"elf\")]"), String(" fn dynamic_relocations(&\'file self) -> Option<DynamicRelocationIterator<\'data, \'file>> {"), String(" let inner = match self.inner {"), String(" FileInternal::Elf32(ref elf) => {"), String(" DynamicRelocationIteratorInternal::Elf32(elf.dynamic_relocations()?)"), String(" }"), String(" FileInternal::Elf64(ref elf) => {"), String(" DynamicRelocationIteratorInternal::Elf64(elf.dynamic_relocations()?)"), String(" }"), String(" _ => return None,"), String(" };"), String(" Some(DynamicRelocationIterator { inner })"), String(" }"), String(""), String(" #[cfg(not(feature = \"elf\"))]"), String(" fn dynamic_relocations(&\'file self) -> Option<DynamicRelocationIterator<\'data, \'file>> {"), String(" None"), String(" }"), String(""), String(" fn symbol_map(&self) -> SymbolMap<SymbolMapName<\'data>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.symbol_map())"), String(" }"), String(""), String(" fn object_map(&self) -> ObjectMap<\'data> {"), String(" with_inner!(self.inner, FileInternal, |x| x.object_map())"), String(" }"), String(""), String(" fn imports(&self) -> Result<Vec<Import<\'data>>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.imports())"), String(" }"), String(""), String(" fn exports(&self) -> Result<Vec<Export<\'data>>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.exports())"), String(" }"), String(""), String(" fn has_debug_symbols(&self) -> bool {"), String(" with_inner!(self.inner, FileInternal, |x| x.has_debug_symbols())"), String(" }"), String(""), String(" #[inline]"), String(" fn mach_uuid(&self) -> Result<Option<[u8; 16]>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.mach_uuid())"), String(" }"), String(""), String(" #[inline]"), String(" fn build_id(&self) -> Result<Option<&\'data [u8]>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.build_id())"), String(" }"), String(""), String(" #[inline]"), String(" fn gnu_debuglink(&self) -> Result<Option<(&\'data [u8], u32)>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.gnu_debuglink())"), String(" }"), String(""), String(" fn entry(&self) -> u64 {"), String(" with_inner!(self.inner, FileInternal, |x| x.entry())"), String(" }"), String(""), String(" fn flags(&self) -> FileFlags {"), String(" with_inner!(self.inner, FileInternal, |x| x.flags())"), String(" }"), String("}"), String(""), String("/// An iterator over the segments of a `File`."), String("#[derive(Debug)]"), String("pub struct SegmentIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SegmentIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SegmentIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSegmentIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSegmentIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSegmentIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSegmentIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSegmentIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSegmentIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSegmentIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSegmentIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SegmentIterator<\'data, \'file> {"), String(" type Item = Segment<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, SegmentIteratorInternal, SegmentInternal)"), String(" .map(|inner| Segment { inner })"), String(" }"), String("}"), String(""), String("/// A segment of a `File`."), String("pub struct Segment<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SegmentInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SegmentInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSegment<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSegment32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSegment64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSegment32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSegment64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSegment32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSegment64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSegment<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Segment<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" // It\'s painful to do much better than this"), String(" let mut s = f.debug_struct(\"Segment\");"), String(" match self.name() {"), String(" Ok(Some(ref name)) => {"), String(" s.field(\"name\", name);"), String(" }"), String(" Ok(None) => {}"), String(" Err(_) => {"), String(" s.field(\"name\", &\"<invalid>\");"), String(" }"), String(" }"), String(" s.field(\"address\", &self.address())"), String(" .field(\"size\", &self.size())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Segment<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSegment<\'data> for Segment<\'data, \'file> {"), String(" fn address(&self) -> u64 {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.address())"), String(" }"), String(""), String(" fn size(&self) -> u64 {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.size())"), String(" }"), String(""), String(" fn align(&self) -> u64 {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.align())"), String(" }"), String(""), String(" fn file_range(&self) -> (u64, u64) {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.file_range())"), String(" }"), String(""), String(" fn data(&self) -> Result<&\'data [u8]> {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.data())"), String(" }"), String(""), String(" fn data_range(&self, address: u64, size: u64) -> Result<Option<&\'data [u8]>> {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.data_range(address, size))"), String(" }"), String(""), String(" fn name(&self) -> Result<Option<&str>> {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.name())"), String(" }"), String("}"), String(""), String("/// An iterator of the sections of a `File`."), String("#[derive(Debug)]"), String("pub struct SectionIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SectionIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("// we wrap our enums in a struct so that they are kept private."), String("#[derive(Debug)]"), String("enum SectionIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSectionIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSectionIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SectionIterator<\'data, \'file> {"), String(" type Item = Section<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, SectionIteratorInternal, SectionInternal)"), String(" .map(|inner| Section { inner })"), String(" }"), String("}"), String(""), String("/// A Section of a File"), String("pub struct Section<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SectionInternal<\'data, \'file>,"), String("}"), String(""), String("enum SectionInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSection<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSection32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSection64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSection32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSection64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSection32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSection64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSection<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Section<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" // It\'s painful to do much better than this"), String(" let mut s = f.debug_struct(\"Section\");"), String(" match self.segment_name() {"), String(" Ok(Some(ref name)) => {"), String(" s.field(\"segment\", name);"), String(" }"), String(" Ok(None) => {}"), String(" Err(_) => {"), String(" s.field(\"segment\", &\"<invalid>\");"), String(" }"), String(" }"), String(" s.field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"), String(" .field(\"address\", &self.address())"), String(" .field(\"size\", &self.size())"), String(" .field(\"align\", &self.align())"), String(" .field(\"kind\", &self.kind())"), String(" .field(\"flags\", &self.flags())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Section<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSection<\'data> for Section<\'data, \'file> {"), String(" type RelocationIterator = SectionRelocationIterator<\'data, \'file>;"), String(""), String(" fn index(&self) -> SectionIndex {"), String(" with_inner!(self.inner, SectionInternal, |x| x.index())"), String(" }"), String(""), String(" fn address(&self) -> u64 {"), String(" with_inner!(self.inner, SectionInternal, |x| x.address())"), String(" }"), String(""), String(" fn size(&self) -> u64 {"), String(" with_inner!(self.inner, SectionInternal, |x| x.size())"), String(" }"), String(""), String(" fn align(&self) -> u64 {"), String(" with_inner!(self.inner, SectionInternal, |x| x.align())"), String(" }"), String(""), String(" fn file_range(&self) -> Option<(u64, u64)> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.file_range())"), String(" }"), String(""), String(" fn data(&self) -> Result<&\'data [u8]> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.data())"), String(" }"), String(""), String(" fn data_range(&self, address: u64, size: u64) -> Result<Option<&\'data [u8]>> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.data_range(address, size))"), String(" }"), String(""), String(" fn compressed_data(&self) -> Result<CompressedData<\'data>> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.compressed_data())"), String(" }"), String(""), String(" fn name(&self) -> Result<&str> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.name())"), String(" }"), String(""), String(" fn segment_name(&self) -> Result<Option<&str>> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.segment_name())"), String(" }"), String(""), String(" fn kind(&self) -> SectionKind {"), String(" with_inner!(self.inner, SectionInternal, |x| x.kind())"), String(" }"), String(""), String(" fn relocations(&self) -> SectionRelocationIterator<\'data, \'file> {"), String(" SectionRelocationIterator {"), String(" inner: map_inner!("), String(" self.inner,"), String(" SectionInternal,"), String(" SectionRelocationIteratorInternal,"), String(" |x| x.relocations()"), String(" ),"), String(" }"), String(" }"), String(""), String(" fn flags(&self) -> SectionFlags {"), String(" with_inner!(self.inner, SectionInternal, |x| x.flags())"), String(" }"), String("}"), String(""), String("/// An iterator of the COMDAT section groups of a `File`."), String("#[derive(Debug)]"), String("pub struct ComdatIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: ComdatIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum ComdatIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffComdatIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfComdatIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfComdatIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOComdatIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOComdatIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeComdatIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeComdatIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmComdatIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for ComdatIterator<\'data, \'file> {"), String(" type Item = Comdat<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, ComdatIteratorInternal, ComdatInternal)"), String(" .map(|inner| Comdat { inner })"), String(" }"), String("}"), String(""), String("/// A COMDAT section group of a `File`."), String("pub struct Comdat<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: ComdatInternal<\'data, \'file>,"), String("}"), String(""), String("enum ComdatInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffComdat<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfComdat32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfComdat64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOComdat32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOComdat64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeComdat32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeComdat64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmComdat<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Comdat<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" let mut s = f.debug_struct(\"Comdat\");"), String(" s.field(\"symbol\", &self.symbol())"), String(" .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"), String(" .field(\"kind\", &self.kind())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Comdat<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectComdat<\'data> for Comdat<\'data, \'file> {"), String(" type SectionIterator = ComdatSectionIterator<\'data, \'file>;"), String(""), String(" fn kind(&self) -> ComdatKind {"), String(" with_inner!(self.inner, ComdatInternal, |x| x.kind())"), String(" }"), String(""), String(" fn symbol(&self) -> SymbolIndex {"), String(" with_inner!(self.inner, ComdatInternal, |x| x.symbol())"), String(" }"), String(""), String(" fn name(&self) -> Result<&str> {"), String(" with_inner!(self.inner, ComdatInternal, |x| x.name())"), String(" }"), String(""), String(" fn sections(&self) -> ComdatSectionIterator<\'data, \'file> {"), String(" ComdatSectionIterator {"), String(" inner: map_inner!("), String(" self.inner,"), String(" ComdatInternal,"), String(" ComdatSectionIteratorInternal,"), String(" |x| x.sections()"), String(" ),"), String(" }"), String(" }"), String("}"), String(""), String("/// An iterator over COMDAT section entries."), String("#[derive(Debug)]"), String("pub struct ComdatSectionIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: ComdatSectionIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum ComdatSectionIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffComdatSectionIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfComdatSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfComdatSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOComdatSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOComdatSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeComdatSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeComdatSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmComdatSectionIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for ComdatSectionIterator<\'data, \'file> {"), String(" type Item = SectionIndex;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" with_inner_mut!(self.inner, ComdatSectionIteratorInternal, |x| x.next())"), String(" }"), String("}"), String(""), String("/// A symbol table."), String("#[derive(Debug)]"), String("pub struct SymbolTable<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SymbolTableInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SymbolTableInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSymbolTable<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSymbolTable32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSymbolTable64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSymbolTable32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSymbolTable64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(coff::CoffSymbolTable<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(coff::CoffSymbolTable<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSymbolTable<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for SymbolTable<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSymbolTable<\'data> for SymbolTable<\'data, \'file> {"), String(" type Symbol = Symbol<\'data, \'file>;"), String(" type SymbolIterator = SymbolIterator<\'data, \'file>;"), String(""), String(" fn symbols(&self) -> Self::SymbolIterator {"), String(" SymbolIterator {"), String(" inner: map_inner!("), String(" self.inner,"), String(" SymbolTableInternal,"), String(" SymbolIteratorInternal,"), String(" |x| x.symbols()"), String(" ),"), String(" }"), String(" }"), String(""), String(" fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol> {"), String(" map_inner_option!(self.inner, SymbolTableInternal, SymbolInternal, |x| x"), String(" .symbol_by_index(index))"), String(" .map(|inner| Symbol { inner })"), String(" }"), String("}"), String(""), String("/// An iterator over symbol table entries."), String("#[derive(Debug)]"), String("pub struct SymbolIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SymbolIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SymbolIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSymbolIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSymbolIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSymbolIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSymbolIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSymbolIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(coff::CoffSymbolIterator<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(coff::CoffSymbolIterator<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSymbolIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SymbolIterator<\'data, \'file> {"), String(" type Item = Symbol<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, SymbolIteratorInternal, SymbolInternal)"), String(" .map(|inner| Symbol { inner })"), String(" }"), String("}"), String(""), String("/// A symbol table entry."), String("pub struct Symbol<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SymbolInternal<\'data, \'file>,"), String("}"), String(""), String("enum SymbolInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSymbol<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSymbol32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSymbol64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSymbol32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSymbol64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(coff::CoffSymbol<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(coff::CoffSymbol<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSymbol<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Symbol<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" f.debug_struct(\"Symbol\")"), String(" .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"), String(" .field(\"address\", &self.address())"), String(" .field(\"size\", &self.size())"), String(" .field(\"kind\", &self.kind())"), String(" .field(\"section\", &self.section())"), String(" .field(\"scope\", &self.scope())"), String(" .field(\"weak\", &self.is_weak())"), String(" .field(\"flags\", &self.flags())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Symbol<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSymbol<\'data> for Symbol<\'data, \'file> {"), String(" fn index(&self) -> SymbolIndex {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.index())"), String(" }"), String(""), String(" fn name(&self) -> Result<&\'data str> {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.name())"), String(" }"), String(""), String(" fn address(&self) -> u64 {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.address())"), String(" }"), String(""), String(" fn size(&self) -> u64 {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.size())"), String(" }"), String(""), String(" fn kind(&self) -> SymbolKind {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.kind())"), String(" }"), String(""), String(" fn section(&self) -> SymbolSection {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.section())"), String(" }"), String(""), String(" fn is_undefined(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_undefined())"), String(" }"), String(""), String(" fn is_definition(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_definition())"), String(" }"), String(""), String(" fn is_common(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_common())"), String(" }"), String(""), String(" fn is_weak(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_weak())"), String(" }"), String(""), String(" fn scope(&self) -> SymbolScope {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.scope())"), String(" }"), String(""), String(" fn is_global(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_global())"), String(" }"), String(""), String(" fn is_local(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_local())"), String(" }"), String(""), String(" fn flags(&self) -> SymbolFlags<SectionIndex> {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.flags())"), String(" }"), String("}"), String(""), String("/// An iterator over dynamic relocation entries."), String("#[derive(Debug)]"), String("pub struct DynamicRelocationIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: DynamicRelocationIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum DynamicRelocationIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfDynamicRelocationIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfDynamicRelocationIterator64<\'data, \'file>),"), String(" // We need to always use the lifetime parameters."), String(" #[allow(unused)]"), String(" None(PhantomData<(&\'data (), &\'file ())>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for DynamicRelocationIterator<\'data, \'file> {"), String(" type Item = (u64, Relocation);"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" match self.inner {"), String(" #[cfg(feature = \"elf\")]"), String(" DynamicRelocationIteratorInternal::Elf32(ref mut elf) => elf.next(),"), String(" #[cfg(feature = \"elf\")]"), String(" DynamicRelocationIteratorInternal::Elf64(ref mut elf) => elf.next(),"), String(" DynamicRelocationIteratorInternal::None(_) => None,"), String(" }"), String(" }"), String("}"), String(""), String("/// An iterator over section relocation entries."), String("#[derive(Debug)]"), String("pub struct SectionRelocationIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SectionRelocationIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SectionRelocationIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffRelocationIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSectionRelocationIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSectionRelocationIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachORelocationIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachORelocationIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeRelocationIterator<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeRelocationIterator<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmRelocationIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SectionRelocationIterator<\'data, \'file> {"), String(" type Item = (u64, Relocation);"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" with_inner_mut!(self.inner, SectionRelocationIteratorInternal, |x| x.next())"), String(" }"), String("}"), String("")])})
11:30:21 INFO unnamed src/language_server_protocol.rs:1077 find_locations; params=Object({"bufnr": Number(2), "character": Number(36), "filename": String("/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "gotoCmd": Null, "handle": Bool(true), "languageId": String("rust"), "line": Number(174), "method": String("textDocument/definition"), "text": Array([String("use alloc::fmt;"), String("use alloc::vec::Vec;"), String("use core::marker::PhantomData;"), String(""), String("#[cfg(feature = \"coff\")]"), String("use crate::read::coff;"), String("#[cfg(feature = \"elf\")]"), String("use crate::read::elf;"), String("#[cfg(feature = \"macho\")]"), String("use crate::read::macho;"), String("#[cfg(feature = \"pe\")]"), String("use crate::read::pe;"), String("#[cfg(feature = \"wasm\")]"), String("use crate::read::wasm;"), String("use crate::read::{"), String(" self, Architecture, BinaryFormat, ComdatKind, CompressedData, Error, Export, FileFlags,"), String(" FileKind, Import, Object, ObjectComdat, ObjectMap, ObjectSection, ObjectSegment, ObjectSymbol,"), String(" ObjectSymbolTable, Relocation, Result, SectionFlags, SectionIndex, SectionKind, SymbolFlags,"), String(" SymbolIndex, SymbolKind, SymbolMap, SymbolMapName, SymbolScope, SymbolSection,"), String("};"), String(""), String("/// Evaluate an expression on the contents of a file format enum."), String("///"), String("/// This is a hack to avoid virtual calls."), String("macro_rules! with_inner {"), String(" ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $enum::Coff(ref $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf32(ref $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf64(ref $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO32(ref $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO64(ref $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe32(ref $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe64(ref $var) => $body,"), String(" #[cfg(feature = \"wasm\")]"), String(" $enum::Wasm(ref $var) => $body,"), String(" }"), String(" };"), String("}"), String(""), String("macro_rules! with_inner_mut {"), String(" ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $enum::Coff(ref mut $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf32(ref mut $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf64(ref mut $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO32(ref mut $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO64(ref mut $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe32(ref mut $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe64(ref mut $var) => $body,"), String(" #[cfg(feature = \"wasm\")]"), String(" $enum::Wasm(ref mut $var) => $body,"), String(" }"), String(" };"), String("}"), String(""), String("/// Like `with_inner!`, but wraps the result in another enum."), String("macro_rules! map_inner {"), String(" ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $from::Coff(ref $var) => $to::Coff($body),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf32(ref $var) => $to::Elf32($body),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf64(ref $var) => $to::Elf64($body),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO32(ref $var) => $to::MachO32($body),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO64(ref $var) => $to::MachO64($body),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe32(ref $var) => $to::Pe32($body),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe64(ref $var) => $to::Pe64($body),"), String(" #[cfg(feature = \"wasm\")]"), String(" $from::Wasm(ref $var) => $to::Wasm($body),"), String(" }"), String(" };"), String("}"), String(""), String("/// Like `map_inner!`, but the result is a Result or Option."), String("macro_rules! map_inner_option {"), String(" ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $from::Coff(ref $var) => $body.map($to::Coff),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf32(ref $var) => $body.map($to::Elf32),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf64(ref $var) => $body.map($to::Elf64),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO32(ref $var) => $body.map($to::MachO32),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO64(ref $var) => $body.map($to::MachO64),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe32(ref $var) => $body.map($to::Pe32),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe64(ref $var) => $body.map($to::Pe64),"), String(" #[cfg(feature = \"wasm\")]"), String(" $from::Wasm(ref $var) => $body.map($to::Wasm),"), String(" }"), String(" };"), String("}"), String(""), String("/// Call `next` for a file format iterator."), String("macro_rules! next_inner {"), String(" ($inner:expr, $from:ident, $to:ident) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $from::Coff(ref mut iter) => iter.next().map($to::Coff),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf32(ref mut iter) => iter.next().map($to::Elf32),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf64(ref mut iter) => iter.next().map($to::Elf64),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO32(ref mut iter) => iter.next().map($to::MachO32),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO64(ref mut iter) => iter.next().map($to::MachO64),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe32(ref mut iter) => iter.next().map($to::Pe32),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe64(ref mut iter) => iter.next().map($to::Pe64),"), String(" #[cfg(feature = \"wasm\")]"), String(" $from::Wasm(ref mut iter) => iter.next().map($to::Wasm),"), String(" }"), String(" };"), String("}"), String(""), String("/// An object file."), String("///"), String("/// Most functionality is provided by the `Object` trait implementation."), String("#[derive(Debug)]"), String("pub struct File<\'data> {"), String(" inner: FileInternal<\'data>,"), String("}"), String(""), String("#[allow(clippy::large_enum_variant)]"), String("#[derive(Debug)]"), String("enum FileInternal<\'data> {"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffFile<\'data>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfFile32<\'data>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfFile64<\'data>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOFile32<\'data>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOFile64<\'data>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeFile32<\'data>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeFile64<\'data>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmFile<\'data>),"), String("}"), String(""), String("impl<\'data> File<\'data> {"), String(" /// Parse the raw file data."), String(" pub fn parse(data: &\'data [u8]) -> Result<Self> {"), String(" let inner = match FileKind::parse(data)? {"), String(" #[cfg(feature = \"elf\")]"), String(" FileKind::Elf32 => FileInternal::Elf32(elf::ElfFile32::parse(data)?),"), String(" #[cfg(feature = \"elf\")]"), String(" FileKind::Elf64 => FileInternal::Elf64(elf::ElfFile64::parse(data)?),"), String(" #[cfg(feature = \"macho\")]"), String(" FileKind::MachO32 => FileInternal::MachO32(macho::MachOFile32::parse(data)?),"), String(" #[cfg(feature = \"macho\")]"), String(" FileKind::MachO64 => FileInternal::MachO64(macho::MachOFile64::parse(data)?),"), String(" #[cfg(feature = \"wasm\")]"), String(" FileKind::Wasm => FileInternal::Wasm(wasm::WasmFile::parse(data)?),"), String(" #[cfg(feature = \"pe\")]"), String(" FileKind::Pe32 => FileInternal::Pe32(pe::PeFile32::parse(data)?),"), String(" #[cfg(feature = \"pe\")]"), String(" FileKind::Pe64 => FileInternal::Pe64(pe::PeFile64::parse(data)?),"), String(" #[cfg(feature = \"coff\")]"), String(" FileKind::Coff => FileInternal::Coff(coff::CoffFile::parse(data)?),"), String(" _ => return Err(Error(\"Unsupported file format\")),"), String(" };"), String(" Ok(File { inner })"), String(" }"), String(""), String(" /// Return the file format."), String(" pub fn format(&self) -> BinaryFormat {"), String(" match self.inner {"), String(" #[cfg(feature = \"coff\")]"), String(" FileInternal::Coff(_) => BinaryFormat::Coff,"), String(" #[cfg(feature = \"elf\")]"), String(" FileInternal::Elf32(_) | FileInternal::Elf64(_) => BinaryFormat::Elf,"), String(" #[cfg(feature = \"macho\")]"), String(" FileInternal::MachO32(_) | FileInternal::MachO64(_) => BinaryFormat::MachO,"), String(" #[cfg(feature = \"pe\")]"), String(" FileInternal::Pe32(_) | FileInternal::Pe64(_) => BinaryFormat::Pe,"), String(" #[cfg(feature = \"wasm\")]"), String(" FileInternal::Wasm(_) => BinaryFormat::Wasm,"), String(" }"), String(" }"), String("}"), String(""), String("impl<\'data> read::private::Sealed for File<\'data> {}"), String(""), String("impl<\'data, \'file> Object<\'data, \'file> for File<\'data>"), String("where"), String(" \'data: \'file,"), String("{"), String(" type Segment = Segment<\'data, \'file>;"), String(" type SegmentIterator = SegmentIterator<\'data, \'file>;"), String(" type Section = Section<\'data, \'file>;"), String(" type SectionIterator = SectionIterator<\'data, \'file>;"), String(" type Comdat = Comdat<\'data, \'file>;"), String(" type ComdatIterator = ComdatIterator<\'data, \'file>;"), String(" type Symbol = Symbol<\'data, \'file>;"), String(" type SymbolIterator = SymbolIterator<\'data, \'file>;"), String(" type SymbolTable = SymbolTable<\'data, \'file>;"), String(" type DynamicRelocationIterator = DynamicRelocationIterator<\'data, \'file>;"), String(""), String(" fn architecture(&self) -> Architecture {"), String(" with_inner!(self.inner, FileInternal, |x| x.architecture())"), String(" }"), String(""), String(" fn is_little_endian(&self) -> bool {"), String(" with_inner!(self.inner, FileInternal, |x| x.is_little_endian())"), String(" }"), String(""), String(" fn is_64(&self) -> bool {"), String(" with_inner!(self.inner, FileInternal, |x| x.is_64())"), String(" }"), String(""), String(" fn segments(&\'file self) -> SegmentIterator<\'data, \'file> {"), String(" SegmentIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SegmentIteratorInternal, |x| x"), String(" .segments()),"), String(" }"), String(" }"), String(""), String(" fn section_by_name(&\'file self, section_name: &str) -> Option<Section<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x"), String(" .section_by_name(section_name))"), String(" .map(|inner| Section { inner })"), String(" }"), String(""), String(" fn section_by_index(&\'file self, index: SectionIndex) -> Result<Section<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x"), String(" .section_by_index(index))"), String(" .map(|inner| Section { inner })"), String(" }"), String(""), String(" fn sections(&\'file self) -> SectionIterator<\'data, \'file> {"), String(" SectionIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SectionIteratorInternal, |x| x"), String(" .sections()),"), String(" }"), String(" }"), String(""), String(" fn comdats(&\'file self) -> ComdatIterator<\'data, \'file> {"), String(" ComdatIterator {"), String(" inner: map_inner!(self.inner, FileInternal, ComdatIteratorInternal, |x| x"), String(" .comdats()),"), String(" }"), String(" }"), String(""), String(" fn symbol_by_index(&\'file self, index: SymbolIndex) -> Result<Symbol<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SymbolInternal, |x| x"), String(" .symbol_by_index(index))"), String(" .map(|inner| Symbol { inner })"), String(" }"), String(""), String(" fn symbols(&\'file self) -> SymbolIterator<\'data, \'file> {"), String(" SymbolIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x"), String(" .symbols()),"), String(" }"), String(" }"), String(""), String(" fn symbol_table(&\'file self) -> Option<SymbolTable<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x"), String(" .symbol_table())"), String(" .map(|inner| SymbolTable { inner })"), String(" }"), String(""), String(" fn dynamic_symbols(&\'file self) -> SymbolIterator<\'data, \'file> {"), String(" SymbolIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x"), String(" .dynamic_symbols()),"), String(" }"), String(" }"), String(""), String(" fn dynamic_symbol_table(&\'file self) -> Option<SymbolTable<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x"), String(" .dynamic_symbol_table())"), String(" .map(|inner| SymbolTable { inner })"), String(" }"), String(""), String(" #[cfg(feature = \"elf\")]"), String(" fn dynamic_relocations(&\'file self) -> Option<DynamicRelocationIterator<\'data, \'file>> {"), String(" let inner = match self.inner {"), String(" FileInternal::Elf32(ref elf) => {"), String(" DynamicRelocationIteratorInternal::Elf32(elf.dynamic_relocations()?)"), String(" }"), String(" FileInternal::Elf64(ref elf) => {"), String(" DynamicRelocationIteratorInternal::Elf64(elf.dynamic_relocations()?)"), String(" }"), String(" _ => return None,"), String(" };"), String(" Some(DynamicRelocationIterator { inner })"), String(" }"), String(""), String(" #[cfg(not(feature = \"elf\"))]"), String(" fn dynamic_relocations(&\'file self) -> Option<DynamicRelocationIterator<\'data, \'file>> {"), String(" None"), String(" }"), String(""), String(" fn symbol_map(&self) -> SymbolMap<SymbolMapName<\'data>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.symbol_map())"), String(" }"), String(""), String(" fn object_map(&self) -> ObjectMap<\'data> {"), String(" with_inner!(self.inner, FileInternal, |x| x.object_map())"), String(" }"), String(""), String(" fn imports(&self) -> Result<Vec<Import<\'data>>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.imports())"), String(" }"), String(""), String(" fn exports(&self) -> Result<Vec<Export<\'data>>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.exports())"), String(" }"), String(""), String(" fn has_debug_symbols(&self) -> bool {"), String(" with_inner!(self.inner, FileInternal, |x| x.has_debug_symbols())"), String(" }"), String(""), String(" #[inline]"), String(" fn mach_uuid(&self) -> Result<Option<[u8; 16]>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.mach_uuid())"), String(" }"), String(""), String(" #[inline]"), String(" fn build_id(&self) -> Result<Option<&\'data [u8]>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.build_id())"), String(" }"), String(""), String(" #[inline]"), String(" fn gnu_debuglink(&self) -> Result<Option<(&\'data [u8], u32)>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.gnu_debuglink())"), String(" }"), String(""), String(" fn entry(&self) -> u64 {"), String(" with_inner!(self.inner, FileInternal, |x| x.entry())"), String(" }"), String(""), String(" fn flags(&self) -> FileFlags {"), String(" with_inner!(self.inner, FileInternal, |x| x.flags())"), String(" }"), String("}"), String(""), String("/// An iterator over the segments of a `File`."), String("#[derive(Debug)]"), String("pub struct SegmentIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SegmentIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SegmentIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSegmentIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSegmentIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSegmentIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSegmentIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSegmentIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSegmentIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSegmentIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSegmentIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SegmentIterator<\'data, \'file> {"), String(" type Item = Segment<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, SegmentIteratorInternal, SegmentInternal)"), String(" .map(|inner| Segment { inner })"), String(" }"), String("}"), String(""), String("/// A segment of a `File`."), String("pub struct Segment<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SegmentInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SegmentInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSegment<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSegment32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSegment64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSegment32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSegment64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSegment32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSegment64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSegment<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Segment<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" // It\'s painful to do much better than this"), String(" let mut s = f.debug_struct(\"Segment\");"), String(" match self.name() {"), String(" Ok(Some(ref name)) => {"), String(" s.field(\"name\", name);"), String(" }"), String(" Ok(None) => {}"), String(" Err(_) => {"), String(" s.field(\"name\", &\"<invalid>\");"), String(" }"), String(" }"), String(" s.field(\"address\", &self.address())"), String(" .field(\"size\", &self.size())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Segment<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSegment<\'data> for Segment<\'data, \'file> {"), String(" fn address(&self) -> u64 {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.address())"), String(" }"), String(""), String(" fn size(&self) -> u64 {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.size())"), String(" }"), String(""), String(" fn align(&self) -> u64 {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.align())"), String(" }"), String(""), String(" fn file_range(&self) -> (u64, u64) {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.file_range())"), String(" }"), String(""), String(" fn data(&self) -> Result<&\'data [u8]> {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.data())"), String(" }"), String(""), String(" fn data_range(&self, address: u64, size: u64) -> Result<Option<&\'data [u8]>> {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.data_range(address, size))"), String(" }"), String(""), String(" fn name(&self) -> Result<Option<&str>> {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.name())"), String(" }"), String("}"), String(""), String("/// An iterator of the sections of a `File`."), String("#[derive(Debug)]"), String("pub struct SectionIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SectionIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("// we wrap our enums in a struct so that they are kept private."), String("#[derive(Debug)]"), String("enum SectionIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSectionIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSectionIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SectionIterator<\'data, \'file> {"), String(" type Item = Section<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, SectionIteratorInternal, SectionInternal)"), String(" .map(|inner| Section { inner })"), String(" }"), String("}"), String(""), String("/// A Section of a File"), String("pub struct Section<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SectionInternal<\'data, \'file>,"), String("}"), String(""), String("enum SectionInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSection<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSection32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSection64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSection32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSection64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSection32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSection64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSection<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Section<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" // It\'s painful to do much better than this"), String(" let mut s = f.debug_struct(\"Section\");"), String(" match self.segment_name() {"), String(" Ok(Some(ref name)) => {"), String(" s.field(\"segment\", name);"), String(" }"), String(" Ok(None) => {}"), String(" Err(_) => {"), String(" s.field(\"segment\", &\"<invalid>\");"), String(" }"), String(" }"), String(" s.field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"), String(" .field(\"address\", &self.address())"), String(" .field(\"size\", &self.size())"), String(" .field(\"align\", &self.align())"), String(" .field(\"kind\", &self.kind())"), String(" .field(\"flags\", &self.flags())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Section<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSection<\'data> for Section<\'data, \'file> {"), String(" type RelocationIterator = SectionRelocationIterator<\'data, \'file>;"), String(""), String(" fn index(&self) -> SectionIndex {"), String(" with_inner!(self.inner, SectionInternal, |x| x.index())"), String(" }"), String(""), String(" fn address(&self) -> u64 {"), String(" with_inner!(self.inner, SectionInternal, |x| x.address())"), String(" }"), String(""), String(" fn size(&self) -> u64 {"), String(" with_inner!(self.inner, SectionInternal, |x| x.size())"), String(" }"), String(""), String(" fn align(&self) -> u64 {"), String(" with_inner!(self.inner, SectionInternal, |x| x.align())"), String(" }"), String(""), String(" fn file_range(&self) -> Option<(u64, u64)> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.file_range())"), String(" }"), String(""), String(" fn data(&self) -> Result<&\'data [u8]> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.data())"), String(" }"), String(""), String(" fn data_range(&self, address: u64, size: u64) -> Result<Option<&\'data [u8]>> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.data_range(address, size))"), String(" }"), String(""), String(" fn compressed_data(&self) -> Result<CompressedData<\'data>> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.compressed_data())"), String(" }"), String(""), String(" fn name(&self) -> Result<&str> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.name())"), String(" }"), String(""), String(" fn segment_name(&self) -> Result<Option<&str>> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.segment_name())"), String(" }"), String(""), String(" fn kind(&self) -> SectionKind {"), String(" with_inner!(self.inner, SectionInternal, |x| x.kind())"), String(" }"), String(""), String(" fn relocations(&self) -> SectionRelocationIterator<\'data, \'file> {"), String(" SectionRelocationIterator {"), String(" inner: map_inner!("), String(" self.inner,"), String(" SectionInternal,"), String(" SectionRelocationIteratorInternal,"), String(" |x| x.relocations()"), String(" ),"), String(" }"), String(" }"), String(""), String(" fn flags(&self) -> SectionFlags {"), String(" with_inner!(self.inner, SectionInternal, |x| x.flags())"), String(" }"), String("}"), String(""), String("/// An iterator of the COMDAT section groups of a `File`."), String("#[derive(Debug)]"), String("pub struct ComdatIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: ComdatIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum ComdatIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffComdatIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfComdatIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfComdatIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOComdatIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOComdatIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeComdatIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeComdatIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmComdatIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for ComdatIterator<\'data, \'file> {"), String(" type Item = Comdat<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, ComdatIteratorInternal, ComdatInternal)"), String(" .map(|inner| Comdat { inner })"), String(" }"), String("}"), String(""), String("/// A COMDAT section group of a `File`."), String("pub struct Comdat<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: ComdatInternal<\'data, \'file>,"), String("}"), String(""), String("enum ComdatInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffComdat<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfComdat32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfComdat64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOComdat32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOComdat64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeComdat32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeComdat64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmComdat<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Comdat<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" let mut s = f.debug_struct(\"Comdat\");"), String(" s.field(\"symbol\", &self.symbol())"), String(" .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"), String(" .field(\"kind\", &self.kind())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Comdat<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectComdat<\'data> for Comdat<\'data, \'file> {"), String(" type SectionIterator = ComdatSectionIterator<\'data, \'file>;"), String(""), String(" fn kind(&self) -> ComdatKind {"), String(" with_inner!(self.inner, ComdatInternal, |x| x.kind())"), String(" }"), String(""), String(" fn symbol(&self) -> SymbolIndex {"), String(" with_inner!(self.inner, ComdatInternal, |x| x.symbol())"), String(" }"), String(""), String(" fn name(&self) -> Result<&str> {"), String(" with_inner!(self.inner, ComdatInternal, |x| x.name())"), String(" }"), String(""), String(" fn sections(&self) -> ComdatSectionIterator<\'data, \'file> {"), String(" ComdatSectionIterator {"), String(" inner: map_inner!("), String(" self.inner,"), String(" ComdatInternal,"), String(" ComdatSectionIteratorInternal,"), String(" |x| x.sections()"), String(" ),"), String(" }"), String(" }"), String("}"), String(""), String("/// An iterator over COMDAT section entries."), String("#[derive(Debug)]"), String("pub struct ComdatSectionIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: ComdatSectionIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum ComdatSectionIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffComdatSectionIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfComdatSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfComdatSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOComdatSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOComdatSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeComdatSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeComdatSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmComdatSectionIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for ComdatSectionIterator<\'data, \'file> {"), String(" type Item = SectionIndex;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" with_inner_mut!(self.inner, ComdatSectionIteratorInternal, |x| x.next())"), String(" }"), String("}"), String(""), String("/// A symbol table."), String("#[derive(Debug)]"), String("pub struct SymbolTable<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SymbolTableInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SymbolTableInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSymbolTable<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSymbolTable32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSymbolTable64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSymbolTable32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSymbolTable64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(coff::CoffSymbolTable<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(coff::CoffSymbolTable<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSymbolTable<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for SymbolTable<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSymbolTable<\'data> for SymbolTable<\'data, \'file> {"), String(" type Symbol = Symbol<\'data, \'file>;"), String(" type SymbolIterator = SymbolIterator<\'data, \'file>;"), String(""), String(" fn symbols(&self) -> Self::SymbolIterator {"), String(" SymbolIterator {"), String(" inner: map_inner!("), String(" self.inner,"), String(" SymbolTableInternal,"), String(" SymbolIteratorInternal,"), String(" |x| x.symbols()"), String(" ),"), String(" }"), String(" }"), String(""), String(" fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol> {"), String(" map_inner_option!(self.inner, SymbolTableInternal, SymbolInternal, |x| x"), String(" .symbol_by_index(index))"), String(" .map(|inner| Symbol { inner })"), String(" }"), String("}"), String(""), String("/// An iterator over symbol table entries."), String("#[derive(Debug)]"), String("pub struct SymbolIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SymbolIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SymbolIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSymbolIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSymbolIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSymbolIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSymbolIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSymbolIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(coff::CoffSymbolIterator<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(coff::CoffSymbolIterator<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSymbolIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SymbolIterator<\'data, \'file> {"), String(" type Item = Symbol<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, SymbolIteratorInternal, SymbolInternal)"), String(" .map(|inner| Symbol { inner })"), String(" }"), String("}"), String(""), String("/// A symbol table entry."), String("pub struct Symbol<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SymbolInternal<\'data, \'file>,"), String("}"), String(""), String("enum SymbolInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSymbol<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSymbol32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSymbol64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSymbol32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSymbol64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(coff::CoffSymbol<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(coff::CoffSymbol<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSymbol<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Symbol<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" f.debug_struct(\"Symbol\")"), String(" .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"), String(" .field(\"address\", &self.address())"), String(" .field(\"size\", &self.size())"), String(" .field(\"kind\", &self.kind())"), String(" .field(\"section\", &self.section())"), String(" .field(\"scope\", &self.scope())"), String(" .field(\"weak\", &self.is_weak())"), String(" .field(\"flags\", &self.flags())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Symbol<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSymbol<\'data> for Symbol<\'data, \'file> {"), String(" fn index(&self) -> SymbolIndex {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.index())"), String(" }"), String(""), String(" fn name(&self) -> Result<&\'data str> {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.name())"), String(" }"), String(""), String(" fn address(&self) -> u64 {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.address())"), String(" }"), String(""), String(" fn size(&self) -> u64 {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.size())"), String(" }"), String(""), String(" fn kind(&self) -> SymbolKind {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.kind())"), String(" }"), String(""), String(" fn section(&self) -> SymbolSection {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.section())"), String(" }"), String(""), String(" fn is_undefined(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_undefined())"), String(" }"), String(""), String(" fn is_definition(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_definition())"), String(" }"), String(""), String(" fn is_common(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_common())"), String(" }"), String(""), String(" fn is_weak(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_weak())"), String(" }"), String(""), String(" fn scope(&self) -> SymbolScope {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.scope())"), String(" }"), String(""), String(" fn is_global(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_global())"), String(" }"), String(""), String(" fn is_local(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_local())"), String(" }"), String(""), String(" fn flags(&self) -> SymbolFlags<SectionIndex> {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.flags())"), String(" }"), String("}"), String(""), String("/// An iterator over dynamic relocation entries."), String("#[derive(Debug)]"), String("pub struct DynamicRelocationIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: DynamicRelocationIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum DynamicRelocationIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfDynamicRelocationIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfDynamicRelocationIterator64<\'data, \'file>),"), String(" // We need to always use the lifetime parameters."), String(" #[allow(unused)]"), String(" None(PhantomData<(&\'data (), &\'file ())>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for DynamicRelocationIterator<\'data, \'file> {"), String(" type Item = (u64, Relocation);"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" match self.inner {"), String(" #[cfg(feature = \"elf\")]"), String(" DynamicRelocationIteratorInternal::Elf32(ref mut elf) => elf.next(),"), String(" #[cfg(feature = \"elf\")]"), String(" DynamicRelocationIteratorInternal::Elf64(ref mut elf) => elf.next(),"), String(" DynamicRelocationIteratorInternal::None(_) => None,"), String(" }"), String(" }"), String("}"), String(""), String("/// An iterator over section relocation entries."), String("#[derive(Debug)]"), String("pub struct SectionRelocationIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SectionRelocationIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SectionRelocationIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffRelocationIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSectionRelocationIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSectionRelocationIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachORelocationIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachORelocationIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeRelocationIterator<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeRelocationIterator<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmRelocationIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SectionRelocationIterator<\'data, \'file> {"), String(" type Item = (u64, Relocation);"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" with_inner_mut!(self.inner, SectionRelocationIteratorInternal, |x| x.next())"), String(" }"), String("}"), String("")])})
11:30:21 INFO unnamed src/language_server_protocol.rs:1993 text_document_did_change; params=Object({"bufnr": Number(2), "character": Number(36), "filename": String("/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"), "gotoCmd": Null, "handle": Bool(true), "languageId": String("rust"), "line": Number(174), "method": String("textDocument/definition"), "text": Array([String("use alloc::fmt;"), String("use alloc::vec::Vec;"), String("use core::marker::PhantomData;"), String(""), String("#[cfg(feature = \"coff\")]"), String("use crate::read::coff;"), String("#[cfg(feature = \"elf\")]"), String("use crate::read::elf;"), String("#[cfg(feature = \"macho\")]"), String("use crate::read::macho;"), String("#[cfg(feature = \"pe\")]"), String("use crate::read::pe;"), String("#[cfg(feature = \"wasm\")]"), String("use crate::read::wasm;"), String("use crate::read::{"), String(" self, Architecture, BinaryFormat, ComdatKind, CompressedData, Error, Export, FileFlags,"), String(" FileKind, Import, Object, ObjectComdat, ObjectMap, ObjectSection, ObjectSegment, ObjectSymbol,"), String(" ObjectSymbolTable, Relocation, Result, SectionFlags, SectionIndex, SectionKind, SymbolFlags,"), String(" SymbolIndex, SymbolKind, SymbolMap, SymbolMapName, SymbolScope, SymbolSection,"), String("};"), String(""), String("/// Evaluate an expression on the contents of a file format enum."), String("///"), String("/// This is a hack to avoid virtual calls."), String("macro_rules! with_inner {"), String(" ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $enum::Coff(ref $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf32(ref $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf64(ref $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO32(ref $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO64(ref $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe32(ref $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe64(ref $var) => $body,"), String(" #[cfg(feature = \"wasm\")]"), String(" $enum::Wasm(ref $var) => $body,"), String(" }"), String(" };"), String("}"), String(""), String("macro_rules! with_inner_mut {"), String(" ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $enum::Coff(ref mut $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf32(ref mut $var) => $body,"), String(" #[cfg(feature = \"elf\")]"), String(" $enum::Elf64(ref mut $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO32(ref mut $var) => $body,"), String(" #[cfg(feature = \"macho\")]"), String(" $enum::MachO64(ref mut $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe32(ref mut $var) => $body,"), String(" #[cfg(feature = \"pe\")]"), String(" $enum::Pe64(ref mut $var) => $body,"), String(" #[cfg(feature = \"wasm\")]"), String(" $enum::Wasm(ref mut $var) => $body,"), String(" }"), String(" };"), String("}"), String(""), String("/// Like `with_inner!`, but wraps the result in another enum."), String("macro_rules! map_inner {"), String(" ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $from::Coff(ref $var) => $to::Coff($body),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf32(ref $var) => $to::Elf32($body),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf64(ref $var) => $to::Elf64($body),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO32(ref $var) => $to::MachO32($body),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO64(ref $var) => $to::MachO64($body),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe32(ref $var) => $to::Pe32($body),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe64(ref $var) => $to::Pe64($body),"), String(" #[cfg(feature = \"wasm\")]"), String(" $from::Wasm(ref $var) => $to::Wasm($body),"), String(" }"), String(" };"), String("}"), String(""), String("/// Like `map_inner!`, but the result is a Result or Option."), String("macro_rules! map_inner_option {"), String(" ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $from::Coff(ref $var) => $body.map($to::Coff),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf32(ref $var) => $body.map($to::Elf32),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf64(ref $var) => $body.map($to::Elf64),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO32(ref $var) => $body.map($to::MachO32),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO64(ref $var) => $body.map($to::MachO64),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe32(ref $var) => $body.map($to::Pe32),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe64(ref $var) => $body.map($to::Pe64),"), String(" #[cfg(feature = \"wasm\")]"), String(" $from::Wasm(ref $var) => $body.map($to::Wasm),"), String(" }"), String(" };"), String("}"), String(""), String("/// Call `next` for a file format iterator."), String("macro_rules! next_inner {"), String(" ($inner:expr, $from:ident, $to:ident) => {"), String(" match $inner {"), String(" #[cfg(feature = \"coff\")]"), String(" $from::Coff(ref mut iter) => iter.next().map($to::Coff),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf32(ref mut iter) => iter.next().map($to::Elf32),"), String(" #[cfg(feature = \"elf\")]"), String(" $from::Elf64(ref mut iter) => iter.next().map($to::Elf64),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO32(ref mut iter) => iter.next().map($to::MachO32),"), String(" #[cfg(feature = \"macho\")]"), String(" $from::MachO64(ref mut iter) => iter.next().map($to::MachO64),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe32(ref mut iter) => iter.next().map($to::Pe32),"), String(" #[cfg(feature = \"pe\")]"), String(" $from::Pe64(ref mut iter) => iter.next().map($to::Pe64),"), String(" #[cfg(feature = \"wasm\")]"), String(" $from::Wasm(ref mut iter) => iter.next().map($to::Wasm),"), String(" }"), String(" };"), String("}"), String(""), String("/// An object file."), String("///"), String("/// Most functionality is provided by the `Object` trait implementation."), String("#[derive(Debug)]"), String("pub struct File<\'data> {"), String(" inner: FileInternal<\'data>,"), String("}"), String(""), String("#[allow(clippy::large_enum_variant)]"), String("#[derive(Debug)]"), String("enum FileInternal<\'data> {"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffFile<\'data>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfFile32<\'data>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfFile64<\'data>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOFile32<\'data>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOFile64<\'data>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeFile32<\'data>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeFile64<\'data>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmFile<\'data>),"), String("}"), String(""), String("impl<\'data> File<\'data> {"), String(" /// Parse the raw file data."), String(" pub fn parse(data: &\'data [u8]) -> Result<Self> {"), String(" let inner = match FileKind::parse(data)? {"), String(" #[cfg(feature = \"elf\")]"), String(" FileKind::Elf32 => FileInternal::Elf32(elf::ElfFile32::parse(data)?),"), String(" #[cfg(feature = \"elf\")]"), String(" FileKind::Elf64 => FileInternal::Elf64(elf::ElfFile64::parse(data)?),"), String(" #[cfg(feature = \"macho\")]"), String(" FileKind::MachO32 => FileInternal::MachO32(macho::MachOFile32::parse(data)?),"), String(" #[cfg(feature = \"macho\")]"), String(" FileKind::MachO64 => FileInternal::MachO64(macho::MachOFile64::parse(data)?),"), String(" #[cfg(feature = \"wasm\")]"), String(" FileKind::Wasm => FileInternal::Wasm(wasm::WasmFile::parse(data)?),"), String(" #[cfg(feature = \"pe\")]"), String(" FileKind::Pe32 => FileInternal::Pe32(pe::PeFile32::parse(data)?),"), String(" #[cfg(feature = \"pe\")]"), String(" FileKind::Pe64 => FileInternal::Pe64(pe::PeFile64::parse(data)?),"), String(" #[cfg(feature = \"coff\")]"), String(" FileKind::Coff => FileInternal::Coff(coff::CoffFile::parse(data)?),"), String(" _ => return Err(Error(\"Unsupported file format\")),"), String(" };"), String(" Ok(File { inner })"), String(" }"), String(""), String(" /// Return the file format."), String(" pub fn format(&self) -> BinaryFormat {"), String(" match self.inner {"), String(" #[cfg(feature = \"coff\")]"), String(" FileInternal::Coff(_) => BinaryFormat::Coff,"), String(" #[cfg(feature = \"elf\")]"), String(" FileInternal::Elf32(_) | FileInternal::Elf64(_) => BinaryFormat::Elf,"), String(" #[cfg(feature = \"macho\")]"), String(" FileInternal::MachO32(_) | FileInternal::MachO64(_) => BinaryFormat::MachO,"), String(" #[cfg(feature = \"pe\")]"), String(" FileInternal::Pe32(_) | FileInternal::Pe64(_) => BinaryFormat::Pe,"), String(" #[cfg(feature = \"wasm\")]"), String(" FileInternal::Wasm(_) => BinaryFormat::Wasm,"), String(" }"), String(" }"), String("}"), String(""), String("impl<\'data> read::private::Sealed for File<\'data> {}"), String(""), String("impl<\'data, \'file> Object<\'data, \'file> for File<\'data>"), String("where"), String(" \'data: \'file,"), String("{"), String(" type Segment = Segment<\'data, \'file>;"), String(" type SegmentIterator = SegmentIterator<\'data, \'file>;"), String(" type Section = Section<\'data, \'file>;"), String(" type SectionIterator = SectionIterator<\'data, \'file>;"), String(" type Comdat = Comdat<\'data, \'file>;"), String(" type ComdatIterator = ComdatIterator<\'data, \'file>;"), String(" type Symbol = Symbol<\'data, \'file>;"), String(" type SymbolIterator = SymbolIterator<\'data, \'file>;"), String(" type SymbolTable = SymbolTable<\'data, \'file>;"), String(" type DynamicRelocationIterator = DynamicRelocationIterator<\'data, \'file>;"), String(""), String(" fn architecture(&self) -> Architecture {"), String(" with_inner!(self.inner, FileInternal, |x| x.architecture())"), String(" }"), String(""), String(" fn is_little_endian(&self) -> bool {"), String(" with_inner!(self.inner, FileInternal, |x| x.is_little_endian())"), String(" }"), String(""), String(" fn is_64(&self) -> bool {"), String(" with_inner!(self.inner, FileInternal, |x| x.is_64())"), String(" }"), String(""), String(" fn segments(&\'file self) -> SegmentIterator<\'data, \'file> {"), String(" SegmentIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SegmentIteratorInternal, |x| x"), String(" .segments()),"), String(" }"), String(" }"), String(""), String(" fn section_by_name(&\'file self, section_name: &str) -> Option<Section<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x"), String(" .section_by_name(section_name))"), String(" .map(|inner| Section { inner })"), String(" }"), String(""), String(" fn section_by_index(&\'file self, index: SectionIndex) -> Result<Section<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x"), String(" .section_by_index(index))"), String(" .map(|inner| Section { inner })"), String(" }"), String(""), String(" fn sections(&\'file self) -> SectionIterator<\'data, \'file> {"), String(" SectionIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SectionIteratorInternal, |x| x"), String(" .sections()),"), String(" }"), String(" }"), String(""), String(" fn comdats(&\'file self) -> ComdatIterator<\'data, \'file> {"), String(" ComdatIterator {"), String(" inner: map_inner!(self.inner, FileInternal, ComdatIteratorInternal, |x| x"), String(" .comdats()),"), String(" }"), String(" }"), String(""), String(" fn symbol_by_index(&\'file self, index: SymbolIndex) -> Result<Symbol<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SymbolInternal, |x| x"), String(" .symbol_by_index(index))"), String(" .map(|inner| Symbol { inner })"), String(" }"), String(""), String(" fn symbols(&\'file self) -> SymbolIterator<\'data, \'file> {"), String(" SymbolIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x"), String(" .symbols()),"), String(" }"), String(" }"), String(""), String(" fn symbol_table(&\'file self) -> Option<SymbolTable<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x"), String(" .symbol_table())"), String(" .map(|inner| SymbolTable { inner })"), String(" }"), String(""), String(" fn dynamic_symbols(&\'file self) -> SymbolIterator<\'data, \'file> {"), String(" SymbolIterator {"), String(" inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x"), String(" .dynamic_symbols()),"), String(" }"), String(" }"), String(""), String(" fn dynamic_symbol_table(&\'file self) -> Option<SymbolTable<\'data, \'file>> {"), String(" map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x"), String(" .dynamic_symbol_table())"), String(" .map(|inner| SymbolTable { inner })"), String(" }"), String(""), String(" #[cfg(feature = \"elf\")]"), String(" fn dynamic_relocations(&\'file self) -> Option<DynamicRelocationIterator<\'data, \'file>> {"), String(" let inner = match self.inner {"), String(" FileInternal::Elf32(ref elf) => {"), String(" DynamicRelocationIteratorInternal::Elf32(elf.dynamic_relocations()?)"), String(" }"), String(" FileInternal::Elf64(ref elf) => {"), String(" DynamicRelocationIteratorInternal::Elf64(elf.dynamic_relocations()?)"), String(" }"), String(" _ => return None,"), String(" };"), String(" Some(DynamicRelocationIterator { inner })"), String(" }"), String(""), String(" #[cfg(not(feature = \"elf\"))]"), String(" fn dynamic_relocations(&\'file self) -> Option<DynamicRelocationIterator<\'data, \'file>> {"), String(" None"), String(" }"), String(""), String(" fn symbol_map(&self) -> SymbolMap<SymbolMapName<\'data>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.symbol_map())"), String(" }"), String(""), String(" fn object_map(&self) -> ObjectMap<\'data> {"), String(" with_inner!(self.inner, FileInternal, |x| x.object_map())"), String(" }"), String(""), String(" fn imports(&self) -> Result<Vec<Import<\'data>>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.imports())"), String(" }"), String(""), String(" fn exports(&self) -> Result<Vec<Export<\'data>>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.exports())"), String(" }"), String(""), String(" fn has_debug_symbols(&self) -> bool {"), String(" with_inner!(self.inner, FileInternal, |x| x.has_debug_symbols())"), String(" }"), String(""), String(" #[inline]"), String(" fn mach_uuid(&self) -> Result<Option<[u8; 16]>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.mach_uuid())"), String(" }"), String(""), String(" #[inline]"), String(" fn build_id(&self) -> Result<Option<&\'data [u8]>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.build_id())"), String(" }"), String(""), String(" #[inline]"), String(" fn gnu_debuglink(&self) -> Result<Option<(&\'data [u8], u32)>> {"), String(" with_inner!(self.inner, FileInternal, |x| x.gnu_debuglink())"), String(" }"), String(""), String(" fn entry(&self) -> u64 {"), String(" with_inner!(self.inner, FileInternal, |x| x.entry())"), String(" }"), String(""), String(" fn flags(&self) -> FileFlags {"), String(" with_inner!(self.inner, FileInternal, |x| x.flags())"), String(" }"), String("}"), String(""), String("/// An iterator over the segments of a `File`."), String("#[derive(Debug)]"), String("pub struct SegmentIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SegmentIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SegmentIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSegmentIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSegmentIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSegmentIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSegmentIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSegmentIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSegmentIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSegmentIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSegmentIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SegmentIterator<\'data, \'file> {"), String(" type Item = Segment<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, SegmentIteratorInternal, SegmentInternal)"), String(" .map(|inner| Segment { inner })"), String(" }"), String("}"), String(""), String("/// A segment of a `File`."), String("pub struct Segment<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SegmentInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SegmentInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSegment<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSegment32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSegment64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSegment32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSegment64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSegment32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSegment64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSegment<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Segment<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" // It\'s painful to do much better than this"), String(" let mut s = f.debug_struct(\"Segment\");"), String(" match self.name() {"), String(" Ok(Some(ref name)) => {"), String(" s.field(\"name\", name);"), String(" }"), String(" Ok(None) => {}"), String(" Err(_) => {"), String(" s.field(\"name\", &\"<invalid>\");"), String(" }"), String(" }"), String(" s.field(\"address\", &self.address())"), String(" .field(\"size\", &self.size())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Segment<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSegment<\'data> for Segment<\'data, \'file> {"), String(" fn address(&self) -> u64 {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.address())"), String(" }"), String(""), String(" fn size(&self) -> u64 {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.size())"), String(" }"), String(""), String(" fn align(&self) -> u64 {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.align())"), String(" }"), String(""), String(" fn file_range(&self) -> (u64, u64) {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.file_range())"), String(" }"), String(""), String(" fn data(&self) -> Result<&\'data [u8]> {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.data())"), String(" }"), String(""), String(" fn data_range(&self, address: u64, size: u64) -> Result<Option<&\'data [u8]>> {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.data_range(address, size))"), String(" }"), String(""), String(" fn name(&self) -> Result<Option<&str>> {"), String(" with_inner!(self.inner, SegmentInternal, |x| x.name())"), String(" }"), String("}"), String(""), String("/// An iterator of the sections of a `File`."), String("#[derive(Debug)]"), String("pub struct SectionIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SectionIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("// we wrap our enums in a struct so that they are kept private."), String("#[derive(Debug)]"), String("enum SectionIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSectionIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSectionIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SectionIterator<\'data, \'file> {"), String(" type Item = Section<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, SectionIteratorInternal, SectionInternal)"), String(" .map(|inner| Section { inner })"), String(" }"), String("}"), String(""), String("/// A Section of a File"), String("pub struct Section<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SectionInternal<\'data, \'file>,"), String("}"), String(""), String("enum SectionInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSection<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSection32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSection64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSection32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSection64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeSection32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeSection64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSection<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Section<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" // It\'s painful to do much better than this"), String(" let mut s = f.debug_struct(\"Section\");"), String(" match self.segment_name() {"), String(" Ok(Some(ref name)) => {"), String(" s.field(\"segment\", name);"), String(" }"), String(" Ok(None) => {}"), String(" Err(_) => {"), String(" s.field(\"segment\", &\"<invalid>\");"), String(" }"), String(" }"), String(" s.field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"), String(" .field(\"address\", &self.address())"), String(" .field(\"size\", &self.size())"), String(" .field(\"align\", &self.align())"), String(" .field(\"kind\", &self.kind())"), String(" .field(\"flags\", &self.flags())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Section<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSection<\'data> for Section<\'data, \'file> {"), String(" type RelocationIterator = SectionRelocationIterator<\'data, \'file>;"), String(""), String(" fn index(&self) -> SectionIndex {"), String(" with_inner!(self.inner, SectionInternal, |x| x.index())"), String(" }"), String(""), String(" fn address(&self) -> u64 {"), String(" with_inner!(self.inner, SectionInternal, |x| x.address())"), String(" }"), String(""), String(" fn size(&self) -> u64 {"), String(" with_inner!(self.inner, SectionInternal, |x| x.size())"), String(" }"), String(""), String(" fn align(&self) -> u64 {"), String(" with_inner!(self.inner, SectionInternal, |x| x.align())"), String(" }"), String(""), String(" fn file_range(&self) -> Option<(u64, u64)> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.file_range())"), String(" }"), String(""), String(" fn data(&self) -> Result<&\'data [u8]> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.data())"), String(" }"), String(""), String(" fn data_range(&self, address: u64, size: u64) -> Result<Option<&\'data [u8]>> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.data_range(address, size))"), String(" }"), String(""), String(" fn compressed_data(&self) -> Result<CompressedData<\'data>> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.compressed_data())"), String(" }"), String(""), String(" fn name(&self) -> Result<&str> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.name())"), String(" }"), String(""), String(" fn segment_name(&self) -> Result<Option<&str>> {"), String(" with_inner!(self.inner, SectionInternal, |x| x.segment_name())"), String(" }"), String(""), String(" fn kind(&self) -> SectionKind {"), String(" with_inner!(self.inner, SectionInternal, |x| x.kind())"), String(" }"), String(""), String(" fn relocations(&self) -> SectionRelocationIterator<\'data, \'file> {"), String(" SectionRelocationIterator {"), String(" inner: map_inner!("), String(" self.inner,"), String(" SectionInternal,"), String(" SectionRelocationIteratorInternal,"), String(" |x| x.relocations()"), String(" ),"), String(" }"), String(" }"), String(""), String(" fn flags(&self) -> SectionFlags {"), String(" with_inner!(self.inner, SectionInternal, |x| x.flags())"), String(" }"), String("}"), String(""), String("/// An iterator of the COMDAT section groups of a `File`."), String("#[derive(Debug)]"), String("pub struct ComdatIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: ComdatIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum ComdatIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffComdatIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfComdatIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfComdatIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOComdatIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOComdatIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeComdatIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeComdatIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmComdatIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for ComdatIterator<\'data, \'file> {"), String(" type Item = Comdat<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, ComdatIteratorInternal, ComdatInternal)"), String(" .map(|inner| Comdat { inner })"), String(" }"), String("}"), String(""), String("/// A COMDAT section group of a `File`."), String("pub struct Comdat<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: ComdatInternal<\'data, \'file>,"), String("}"), String(""), String("enum ComdatInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffComdat<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfComdat32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfComdat64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOComdat32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOComdat64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeComdat32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeComdat64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmComdat<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Comdat<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" let mut s = f.debug_struct(\"Comdat\");"), String(" s.field(\"symbol\", &self.symbol())"), String(" .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"), String(" .field(\"kind\", &self.kind())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Comdat<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectComdat<\'data> for Comdat<\'data, \'file> {"), String(" type SectionIterator = ComdatSectionIterator<\'data, \'file>;"), String(""), String(" fn kind(&self) -> ComdatKind {"), String(" with_inner!(self.inner, ComdatInternal, |x| x.kind())"), String(" }"), String(""), String(" fn symbol(&self) -> SymbolIndex {"), String(" with_inner!(self.inner, ComdatInternal, |x| x.symbol())"), String(" }"), String(""), String(" fn name(&self) -> Result<&str> {"), String(" with_inner!(self.inner, ComdatInternal, |x| x.name())"), String(" }"), String(""), String(" fn sections(&self) -> ComdatSectionIterator<\'data, \'file> {"), String(" ComdatSectionIterator {"), String(" inner: map_inner!("), String(" self.inner,"), String(" ComdatInternal,"), String(" ComdatSectionIteratorInternal,"), String(" |x| x.sections()"), String(" ),"), String(" }"), String(" }"), String("}"), String(""), String("/// An iterator over COMDAT section entries."), String("#[derive(Debug)]"), String("pub struct ComdatSectionIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: ComdatSectionIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum ComdatSectionIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffComdatSectionIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfComdatSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfComdatSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOComdatSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOComdatSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeComdatSectionIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeComdatSectionIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmComdatSectionIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for ComdatSectionIterator<\'data, \'file> {"), String(" type Item = SectionIndex;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" with_inner_mut!(self.inner, ComdatSectionIteratorInternal, |x| x.next())"), String(" }"), String("}"), String(""), String("/// A symbol table."), String("#[derive(Debug)]"), String("pub struct SymbolTable<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SymbolTableInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SymbolTableInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSymbolTable<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSymbolTable32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSymbolTable64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSymbolTable32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSymbolTable64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(coff::CoffSymbolTable<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(coff::CoffSymbolTable<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSymbolTable<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for SymbolTable<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSymbolTable<\'data> for SymbolTable<\'data, \'file> {"), String(" type Symbol = Symbol<\'data, \'file>;"), String(" type SymbolIterator = SymbolIterator<\'data, \'file>;"), String(""), String(" fn symbols(&self) -> Self::SymbolIterator {"), String(" SymbolIterator {"), String(" inner: map_inner!("), String(" self.inner,"), String(" SymbolTableInternal,"), String(" SymbolIteratorInternal,"), String(" |x| x.symbols()"), String(" ),"), String(" }"), String(" }"), String(""), String(" fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol> {"), String(" map_inner_option!(self.inner, SymbolTableInternal, SymbolInternal, |x| x"), String(" .symbol_by_index(index))"), String(" .map(|inner| Symbol { inner })"), String(" }"), String("}"), String(""), String("/// An iterator over symbol table entries."), String("#[derive(Debug)]"), String("pub struct SymbolIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SymbolIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SymbolIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSymbolIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSymbolIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSymbolIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSymbolIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSymbolIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(coff::CoffSymbolIterator<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(coff::CoffSymbolIterator<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSymbolIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SymbolIterator<\'data, \'file> {"), String(" type Item = Symbol<\'data, \'file>;"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" next_inner!(self.inner, SymbolIteratorInternal, SymbolInternal)"), String(" .map(|inner| Symbol { inner })"), String(" }"), String("}"), String(""), String("/// A symbol table entry."), String("pub struct Symbol<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SymbolInternal<\'data, \'file>,"), String("}"), String(""), String("enum SymbolInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffSymbol<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSymbol32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSymbol64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachOSymbol32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachOSymbol64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(coff::CoffSymbol<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(coff::CoffSymbol<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmSymbol<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> fmt::Debug for Symbol<\'data, \'file> {"), String(" fn fmt(&self, f: &mut fmt::Formatter<\'_>) -> fmt::Result {"), String(" f.debug_struct(\"Symbol\")"), String(" .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"), String(" .field(\"address\", &self.address())"), String(" .field(\"size\", &self.size())"), String(" .field(\"kind\", &self.kind())"), String(" .field(\"section\", &self.section())"), String(" .field(\"scope\", &self.scope())"), String(" .field(\"weak\", &self.is_weak())"), String(" .field(\"flags\", &self.flags())"), String(" .finish()"), String(" }"), String("}"), String(""), String("impl<\'data, \'file> read::private::Sealed for Symbol<\'data, \'file> {}"), String(""), String("impl<\'data, \'file> ObjectSymbol<\'data> for Symbol<\'data, \'file> {"), String(" fn index(&self) -> SymbolIndex {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.index())"), String(" }"), String(""), String(" fn name(&self) -> Result<&\'data str> {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.name())"), String(" }"), String(""), String(" fn address(&self) -> u64 {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.address())"), String(" }"), String(""), String(" fn size(&self) -> u64 {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.size())"), String(" }"), String(""), String(" fn kind(&self) -> SymbolKind {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.kind())"), String(" }"), String(""), String(" fn section(&self) -> SymbolSection {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.section())"), String(" }"), String(""), String(" fn is_undefined(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_undefined())"), String(" }"), String(""), String(" fn is_definition(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_definition())"), String(" }"), String(""), String(" fn is_common(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_common())"), String(" }"), String(""), String(" fn is_weak(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_weak())"), String(" }"), String(""), String(" fn scope(&self) -> SymbolScope {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.scope())"), String(" }"), String(""), String(" fn is_global(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_global())"), String(" }"), String(""), String(" fn is_local(&self) -> bool {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.is_local())"), String(" }"), String(""), String(" fn flags(&self) -> SymbolFlags<SectionIndex> {"), String(" with_inner!(self.inner, SymbolInternal, |x| x.flags())"), String(" }"), String("}"), String(""), String("/// An iterator over dynamic relocation entries."), String("#[derive(Debug)]"), String("pub struct DynamicRelocationIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: DynamicRelocationIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum DynamicRelocationIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfDynamicRelocationIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfDynamicRelocationIterator64<\'data, \'file>),"), String(" // We need to always use the lifetime parameters."), String(" #[allow(unused)]"), String(" None(PhantomData<(&\'data (), &\'file ())>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for DynamicRelocationIterator<\'data, \'file> {"), String(" type Item = (u64, Relocation);"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" match self.inner {"), String(" #[cfg(feature = \"elf\")]"), String(" DynamicRelocationIteratorInternal::Elf32(ref mut elf) => elf.next(),"), String(" #[cfg(feature = \"elf\")]"), String(" DynamicRelocationIteratorInternal::Elf64(ref mut elf) => elf.next(),"), String(" DynamicRelocationIteratorInternal::None(_) => None,"), String(" }"), String(" }"), String("}"), String(""), String("/// An iterator over section relocation entries."), String("#[derive(Debug)]"), String("pub struct SectionRelocationIterator<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" inner: SectionRelocationIteratorInternal<\'data, \'file>,"), String("}"), String(""), String("#[derive(Debug)]"), String("enum SectionRelocationIteratorInternal<\'data, \'file>"), String("where"), String(" \'data: \'file,"), String("{"), String(" #[cfg(feature = \"coff\")]"), String(" Coff(coff::CoffRelocationIterator<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf32(elf::ElfSectionRelocationIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"elf\")]"), String(" Elf64(elf::ElfSectionRelocationIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO32(macho::MachORelocationIterator32<\'data, \'file>),"), String(" #[cfg(feature = \"macho\")]"), String(" MachO64(macho::MachORelocationIterator64<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe32(pe::PeRelocationIterator<\'data, \'file>),"), String(" #[cfg(feature = \"pe\")]"), String(" Pe64(pe::PeRelocationIterator<\'data, \'file>),"), String(" #[cfg(feature = \"wasm\")]"), String(" Wasm(wasm::WasmRelocationIterator<\'data, \'file>),"), String("}"), String(""), String("impl<\'data, \'file> Iterator for SectionRelocationIterator<\'data, \'file> {"), String(" type Item = (u64, Relocation);"), String(""), String(" fn next(&mut self) -> Option<Self::Item> {"), String(" with_inner_mut!(self.inner, SectionRelocationIteratorInternal, |x| x.next())"), String(" }"), String("}"), String("")])})
11:30:21 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"LSP#text","params":["/mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"],"id":39}
11:30:21 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 39, "jsonrpc": "2.0", "result": ["use alloc::fmt;", "use alloc::vec::Vec;", "use core::marker::PhantomData;", "", "#[cfg(feature = \"coff\")]", "use crate::read::coff;", "#[cfg(feature = \"elf\")]", "use crate::read::elf;", "#[cfg(feature = \"macho\")]", "use crate::read::macho;", "#[cfg(feature = \"pe\")]", "use crate::read::pe;", "#[cfg(feature = \"wasm\")]", "use crate::read::wasm;", "use crate::read::{", " self, Architecture, BinaryFormat, ComdatKind, CompressedData, Error, Export, FileFlags,", " FileKind, Import, Object, ObjectComdat, ObjectMap, ObjectSection, ObjectSegment, ObjectSymbol,", " ObjectSymbolTable, Relocation, Result, SectionFlags, SectionIndex, SectionKind, SymbolFlags,", " SymbolIndex, SymbolKind, SymbolMap, SymbolMapName, SymbolScope, SymbolSection,", "};", "", "/// Evaluate an expression on the contents of a file format enum.", "///", "/// This is a hack to avoid virtual calls.", "macro_rules! with_inner {", " ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $enum::Coff(ref $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf32(ref $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf64(ref $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO32(ref $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO64(ref $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe32(ref $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe64(ref $var) => $body,", " #[cfg(feature = \"wasm\")]", " $enum::Wasm(ref $var) => $body,", " }", " };", "}", "", "macro_rules! with_inner_mut {", " ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $enum::Coff(ref mut $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf32(ref mut $var) => $body,", " #[cfg(feature = \"elf\")]", " $enum::Elf64(ref mut $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO32(ref mut $var) => $body,", " #[cfg(feature = \"macho\")]", " $enum::MachO64(ref mut $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe32(ref mut $var) => $body,", " #[cfg(feature = \"pe\")]", " $enum::Pe64(ref mut $var) => $body,", " #[cfg(feature = \"wasm\")]", " $enum::Wasm(ref mut $var) => $body,", " }", " };", "}", "", "/// Like `with_inner!`, but wraps the result in another enum.", "macro_rules! map_inner {", " ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $from::Coff(ref $var) => $to::Coff($body),", " #[cfg(feature = \"elf\")]", " $from::Elf32(ref $var) => $to::Elf32($body),", " #[cfg(feature = \"elf\")]", " $from::Elf64(ref $var) => $to::Elf64($body),", " #[cfg(feature = \"macho\")]", " $from::MachO32(ref $var) => $to::MachO32($body),", " #[cfg(feature = \"macho\")]", " $from::MachO64(ref $var) => $to::MachO64($body),", " #[cfg(feature = \"pe\")]", " $from::Pe32(ref $var) => $to::Pe32($body),", " #[cfg(feature = \"pe\")]", " $from::Pe64(ref $var) => $to::Pe64($body),", " #[cfg(feature = \"wasm\")]", " $from::Wasm(ref $var) => $to::Wasm($body),", " }", " };", "}", "", "/// Like `map_inner!`, but the result is a Result or Option.", "macro_rules! map_inner_option {", " ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $from::Coff(ref $var) => $body.map($to::Coff),", " #[cfg(feature = \"elf\")]", " $from::Elf32(ref $var) => $body.map($to::Elf32),", " #[cfg(feature = \"elf\")]", " $from::Elf64(ref $var) => $body.map($to::Elf64),", " #[cfg(feature = \"macho\")]", " $from::MachO32(ref $var) => $body.map($to::MachO32),", " #[cfg(feature = \"macho\")]", " $from::MachO64(ref $var) => $body.map($to::MachO64),", " #[cfg(feature = \"pe\")]", " $from::Pe32(ref $var) => $body.map($to::Pe32),", " #[cfg(feature = \"pe\")]", " $from::Pe64(ref $var) => $body.map($to::Pe64),", " #[cfg(feature = \"wasm\")]", " $from::Wasm(ref $var) => $body.map($to::Wasm),", " }", " };", "}", "", "/// Call `next` for a file format iterator.", "macro_rules! next_inner {", " ($inner:expr, $from:ident, $to:ident) => {", " match $inner {", " #[cfg(feature = \"coff\")]", " $from::Coff(ref mut iter) => iter.next().map($to::Coff),", " #[cfg(feature = \"elf\")]", " $from::Elf32(ref mut iter) => iter.next().map($to::Elf32),", " #[cfg(feature = \"elf\")]", " $from::Elf64(ref mut iter) => iter.next().map($to::Elf64),", " #[cfg(feature = \"macho\")]", " $from::MachO32(ref mut iter) => iter.next().map($to::MachO32),", " #[cfg(feature = \"macho\")]", " $from::MachO64(ref mut iter) => iter.next().map($to::MachO64),", " #[cfg(feature = \"pe\")]", " $from::Pe32(ref mut iter) => iter.next().map($to::Pe32),", " #[cfg(feature = \"pe\")]", " $from::Pe64(ref mut iter) => iter.next().map($to::Pe64),", " #[cfg(feature = \"wasm\")]", " $from::Wasm(ref mut iter) => iter.next().map($to::Wasm),", " }", " };", "}", "", "/// An object file.", "///", "/// Most functionality is provided by the `Object` trait implementation.", "#[derive(Debug)]", "pub struct File<'data> {", " inner: FileInternal<'data>,", "}", "", "#[allow(clippy::large_enum_variant)]", "#[derive(Debug)]", "enum FileInternal<'data> {", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffFile<'data>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfFile32<'data>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfFile64<'data>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOFile32<'data>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOFile64<'data>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeFile32<'data>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeFile64<'data>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmFile<'data>),", "}", "", "impl<'data> File<'data> {", " /// Parse the raw file data.", " pub fn parse(data: &'data [u8]) -> Result<Self> {", " let inner = match FileKind::parse(data)? {", " #[cfg(feature = \"elf\")]", " FileKind::Elf32 => FileInternal::Elf32(elf::ElfFile32::parse(data)?),", " #[cfg(feature = \"elf\")]", " FileKind::Elf64 => FileInternal::Elf64(elf::ElfFile64::parse(data)?),", " #[cfg(feature = \"macho\")]", " FileKind::MachO32 => FileInternal::MachO32(macho::MachOFile32::parse(data)?),", " #[cfg(feature = \"macho\")]", " FileKind::MachO64 => FileInternal::MachO64(macho::MachOFile64::parse(data)?),", " #[cfg(feature = \"wasm\")]", " FileKind::Wasm => FileInternal::Wasm(wasm::WasmFile::parse(data)?),", " #[cfg(feature = \"pe\")]", " FileKind::Pe32 => FileInternal::Pe32(pe::PeFile32::parse(data)?),", " #[cfg(feature = \"pe\")]", " FileKind::Pe64 => FileInternal::Pe64(pe::PeFile64::parse(data)?),", " #[cfg(feature = \"coff\")]", " FileKind::Coff => FileInternal::Coff(coff::CoffFile::parse(data)?),", " _ => return Err(Error(\"Unsupported file format\")),", " };", " Ok(File { inner })", " }", "", " /// Return the file format.", " pub fn format(&self) -> BinaryFormat {", " match self.inner {", " #[cfg(feature = \"coff\")]", " FileInternal::Coff(_) => BinaryFormat::Coff,", " #[cfg(feature = \"elf\")]", " FileInternal::Elf32(_) | FileInternal::Elf64(_) => BinaryFormat::Elf,", " #[cfg(feature = \"macho\")]", " FileInternal::MachO32(_) | FileInternal::MachO64(_) => BinaryFormat::MachO,", " #[cfg(feature = \"pe\")]", " FileInternal::Pe32(_) | FileInternal::Pe64(_) => BinaryFormat::Pe,", " #[cfg(feature = \"wasm\")]", " FileInternal::Wasm(_) => BinaryFormat::Wasm,", " }", " }", "}", "", "impl<'data> read::private::Sealed for File<'data> {}", "", "impl<'data, 'file> Object<'data, 'file> for File<'data>", "where", " 'data: 'file,", "{", " type Segment = Segment<'data, 'file>;", " type SegmentIterator = SegmentIterator<'data, 'file>;", " type Section = Section<'data, 'file>;", " type SectionIterator = SectionIterator<'data, 'file>;", " type Comdat = Comdat<'data, 'file>;", " type ComdatIterator = ComdatIterator<'data, 'file>;", " type Symbol = Symbol<'data, 'file>;", " type SymbolIterator = SymbolIterator<'data, 'file>;", " type SymbolTable = SymbolTable<'data, 'file>;", " type DynamicRelocationIterator = DynamicRelocationIterator<'data, 'file>;", "", " fn architecture(&self) -> Architecture {", " with_inner!(self.inner, FileInternal, |x| x.architecture())", " }", "", " fn is_little_endian(&self) -> bool {", " with_inner!(self.inner, FileInternal, |x| x.is_little_endian())", " }", "", " fn is_64(&self) -> bool {", " with_inner!(self.inner, FileInternal, |x| x.is_64())", " }", "", " fn segments(&'file self) -> SegmentIterator<'data, 'file> {", " SegmentIterator {", " inner: map_inner!(self.inner, FileInternal, SegmentIteratorInternal, |x| x", " .segments()),", " }", " }", "", " fn section_by_name(&'file self, section_name: &str) -> Option<Section<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x", " .section_by_name(section_name))", " .map(|inner| Section { inner })", " }", "", " fn section_by_index(&'file self, index: SectionIndex) -> Result<Section<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x", " .section_by_index(index))", " .map(|inner| Section { inner })", " }", "", " fn sections(&'file self) -> SectionIterator<'data, 'file> {", " SectionIterator {", " inner: map_inner!(self.inner, FileInternal, SectionIteratorInternal, |x| x", " .sections()),", " }", " }", "", " fn comdats(&'file self) -> ComdatIterator<'data, 'file> {", " ComdatIterator {", " inner: map_inner!(self.inner, FileInternal, ComdatIteratorInternal, |x| x", " .comdats()),", " }", " }", "", " fn symbol_by_index(&'file self, index: SymbolIndex) -> Result<Symbol<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SymbolInternal, |x| x", " .symbol_by_index(index))", " .map(|inner| Symbol { inner })", " }", "", " fn symbols(&'file self) -> SymbolIterator<'data, 'file> {", " SymbolIterator {", " inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x", " .symbols()),", " }", " }", "", " fn symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x", " .symbol_table())", " .map(|inner| SymbolTable { inner })", " }", "", " fn dynamic_symbols(&'file self) -> SymbolIterator<'data, 'file> {", " SymbolIterator {", " inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x", " .dynamic_symbols()),", " }", " }", "", " fn dynamic_symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {", " map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x", " .dynamic_symbol_table())", " .map(|inner| SymbolTable { inner })", " }", "", " #[cfg(feature = \"elf\")]", " fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {", " let inner = match self.inner {", " FileInternal::Elf32(ref elf) => {", " DynamicRelocationIteratorInternal::Elf32(elf.dynamic_relocations()?)", " }", " FileInternal::Elf64(ref elf) => {", " DynamicRelocationIteratorInternal::Elf64(elf.dynamic_relocations()?)", " }", " _ => return None,", " };", " Some(DynamicRelocationIterator { inner })", " }", "", " #[cfg(not(feature = \"elf\"))]", " fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {", " None", " }", "", " fn symbol_map(&self) -> SymbolMap<SymbolMapName<'data>> {", " with_inner!(self.inner, FileInternal, |x| x.symbol_map())", " }", "", " fn object_map(&self) -> ObjectMap<'data> {", " with_inner!(self.inner, FileInternal, |x| x.object_map())", " }", "", " fn imports(&self) -> Result<Vec<Import<'data>>> {", " with_inner!(self.inner, FileInternal, |x| x.imports())", " }", "", " fn exports(&self) -> Result<Vec<Export<'data>>> {", " with_inner!(self.inner, FileInternal, |x| x.exports())", " }", "", " fn has_debug_symbols(&self) -> bool {", " with_inner!(self.inner, FileInternal, |x| x.has_debug_symbols())", " }", "", " #[inline]", " fn mach_uuid(&self) -> Result<Option<[u8; 16]>> {", " with_inner!(self.inner, FileInternal, |x| x.mach_uuid())", " }", "", " #[inline]", " fn build_id(&self) -> Result<Option<&'data [u8]>> {", " with_inner!(self.inner, FileInternal, |x| x.build_id())", " }", "", " #[inline]", " fn gnu_debuglink(&self) -> Result<Option<(&'data [u8], u32)>> {", " with_inner!(self.inner, FileInternal, |x| x.gnu_debuglink())", " }", "", " fn entry(&self) -> u64 {", " with_inner!(self.inner, FileInternal, |x| x.entry())", " }", "", " fn flags(&self) -> FileFlags {", " with_inner!(self.inner, FileInternal, |x| x.flags())", " }", "}", "", "/// An iterator over the segments of a `File`.", "#[derive(Debug)]", "pub struct SegmentIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SegmentIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SegmentIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSegmentIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSegmentIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSegmentIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSegmentIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSegmentIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSegmentIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSegmentIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSegmentIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SegmentIterator<'data, 'file> {", " type Item = Segment<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, SegmentIteratorInternal, SegmentInternal)", " .map(|inner| Segment { inner })", " }", "}", "", "/// A segment of a `File`.", "pub struct Segment<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SegmentInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SegmentInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSegment<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSegment32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSegment64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSegment32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSegment64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSegment32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSegment64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSegment<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Segment<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " // It's painful to do much better than this", " let mut s = f.debug_struct(\"Segment\");", " match self.name() {", " Ok(Some(ref name)) => {", " s.field(\"name\", name);", " }", " Ok(None) => {}", " Err(_) => {", " s.field(\"name\", &\"<invalid>\");", " }", " }", " s.field(\"address\", &self.address())", " .field(\"size\", &self.size())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Segment<'data, 'file> {}", "", "impl<'data, 'file> ObjectSegment<'data> for Segment<'data, 'file> {", " fn address(&self) -> u64 {", " with_inner!(self.inner, SegmentInternal, |x| x.address())", " }", "", " fn size(&self) -> u64 {", " with_inner!(self.inner, SegmentInternal, |x| x.size())", " }", "", " fn align(&self) -> u64 {", " with_inner!(self.inner, SegmentInternal, |x| x.align())", " }", "", " fn file_range(&self) -> (u64, u64) {", " with_inner!(self.inner, SegmentInternal, |x| x.file_range())", " }", "", " fn data(&self) -> Result<&'data [u8]> {", " with_inner!(self.inner, SegmentInternal, |x| x.data())", " }", "", " fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {", " with_inner!(self.inner, SegmentInternal, |x| x.data_range(address, size))", " }", "", " fn name(&self) -> Result<Option<&str>> {", " with_inner!(self.inner, SegmentInternal, |x| x.name())", " }", "}", "", "/// An iterator of the sections of a `File`.", "#[derive(Debug)]", "pub struct SectionIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SectionIteratorInternal<'data, 'file>,", "}", "", "// we wrap our enums in a struct so that they are kept private.", "#[derive(Debug)]", "enum SectionIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSectionIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSectionIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSectionIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSectionIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSectionIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSectionIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSectionIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSectionIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SectionIterator<'data, 'file> {", " type Item = Section<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, SectionIteratorInternal, SectionInternal)", " .map(|inner| Section { inner })", " }", "}", "", "/// A Section of a File", "pub struct Section<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SectionInternal<'data, 'file>,", "}", "", "enum SectionInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSection<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSection32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSection64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSection32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSection64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeSection32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeSection64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSection<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Section<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " // It's painful to do much better than this", " let mut s = f.debug_struct(\"Section\");", " match self.segment_name() {", " Ok(Some(ref name)) => {", " s.field(\"segment\", name);", " }", " Ok(None) => {}", " Err(_) => {", " s.field(\"segment\", &\"<invalid>\");", " }", " }", " s.field(\"name\", &self.name().unwrap_or(\"<invalid>\"))", " .field(\"address\", &self.address())", " .field(\"size\", &self.size())", " .field(\"align\", &self.align())", " .field(\"kind\", &self.kind())", " .field(\"flags\", &self.flags())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Section<'data, 'file> {}", "", "impl<'data, 'file> ObjectSection<'data> for Section<'data, 'file> {", " type RelocationIterator = SectionRelocationIterator<'data, 'file>;", "", " fn index(&self) -> SectionIndex {", " with_inner!(self.inner, SectionInternal, |x| x.index())", " }", "", " fn address(&self) -> u64 {", " with_inner!(self.inner, SectionInternal, |x| x.address())", " }", "", " fn size(&self) -> u64 {", " with_inner!(self.inner, SectionInternal, |x| x.size())", " }", "", " fn align(&self) -> u64 {", " with_inner!(self.inner, SectionInternal, |x| x.align())", " }", "", " fn file_range(&self) -> Option<(u64, u64)> {", " with_inner!(self.inner, SectionInternal, |x| x.file_range())", " }", "", " fn data(&self) -> Result<&'data [u8]> {", " with_inner!(self.inner, SectionInternal, |x| x.data())", " }", "", " fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {", " with_inner!(self.inner, SectionInternal, |x| x.data_range(address, size))", " }", "", " fn compressed_data(&self) -> Result<CompressedData<'data>> {", " with_inner!(self.inner, SectionInternal, |x| x.compressed_data())", " }", "", " fn name(&self) -> Result<&str> {", " with_inner!(self.inner, SectionInternal, |x| x.name())", " }", "", " fn segment_name(&self) -> Result<Option<&str>> {", " with_inner!(self.inner, SectionInternal, |x| x.segment_name())", " }", "", " fn kind(&self) -> SectionKind {", " with_inner!(self.inner, SectionInternal, |x| x.kind())", " }", "", " fn relocations(&self) -> SectionRelocationIterator<'data, 'file> {", " SectionRelocationIterator {", " inner: map_inner!(", " self.inner,", " SectionInternal,", " SectionRelocationIteratorInternal,", " |x| x.relocations()", " ),", " }", " }", "", " fn flags(&self) -> SectionFlags {", " with_inner!(self.inner, SectionInternal, |x| x.flags())", " }", "}", "", "/// An iterator of the COMDAT section groups of a `File`.", "#[derive(Debug)]", "pub struct ComdatIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: ComdatIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum ComdatIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffComdatIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfComdatIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfComdatIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOComdatIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOComdatIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeComdatIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeComdatIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmComdatIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for ComdatIterator<'data, 'file> {", " type Item = Comdat<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, ComdatIteratorInternal, ComdatInternal)", " .map(|inner| Comdat { inner })", " }", "}", "", "/// A COMDAT section group of a `File`.", "pub struct Comdat<'data, 'file>", "where", " 'data: 'file,", "{", " inner: ComdatInternal<'data, 'file>,", "}", "", "enum ComdatInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffComdat<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfComdat32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfComdat64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOComdat32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOComdat64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeComdat32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeComdat64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmComdat<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Comdat<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " let mut s = f.debug_struct(\"Comdat\");", " s.field(\"symbol\", &self.symbol())", " .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))", " .field(\"kind\", &self.kind())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Comdat<'data, 'file> {}", "", "impl<'data, 'file> ObjectComdat<'data> for Comdat<'data, 'file> {", " type SectionIterator = ComdatSectionIterator<'data, 'file>;", "", " fn kind(&self) -> ComdatKind {", " with_inner!(self.inner, ComdatInternal, |x| x.kind())", " }", "", " fn symbol(&self) -> SymbolIndex {", " with_inner!(self.inner, ComdatInternal, |x| x.symbol())", " }", "", " fn name(&self) -> Result<&str> {", " with_inner!(self.inner, ComdatInternal, |x| x.name())", " }", "", " fn sections(&self) -> ComdatSectionIterator<'data, 'file> {", " ComdatSectionIterator {", " inner: map_inner!(", " self.inner,", " ComdatInternal,", " ComdatSectionIteratorInternal,", " |x| x.sections()", " ),", " }", " }", "}", "", "/// An iterator over COMDAT section entries.", "#[derive(Debug)]", "pub struct ComdatSectionIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: ComdatSectionIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum ComdatSectionIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffComdatSectionIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfComdatSectionIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfComdatSectionIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOComdatSectionIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOComdatSectionIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeComdatSectionIterator32<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeComdatSectionIterator64<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmComdatSectionIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for ComdatSectionIterator<'data, 'file> {", " type Item = SectionIndex;", "", " fn next(&mut self) -> Option<Self::Item> {", " with_inner_mut!(self.inner, ComdatSectionIteratorInternal, |x| x.next())", " }", "}", "", "/// A symbol table.", "#[derive(Debug)]", "pub struct SymbolTable<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SymbolTableInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SymbolTableInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSymbolTable<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSymbolTable32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSymbolTable64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSymbolTable32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSymbolTable64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(coff::CoffSymbolTable<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(coff::CoffSymbolTable<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSymbolTable<'data, 'file>),", "}", "", "impl<'data, 'file> read::private::Sealed for SymbolTable<'data, 'file> {}", "", "impl<'data, 'file> ObjectSymbolTable<'data> for SymbolTable<'data, 'file> {", " type Symbol = Symbol<'data, 'file>;", " type SymbolIterator = SymbolIterator<'data, 'file>;", "", " fn symbols(&self) -> Self::SymbolIterator {", " SymbolIterator {", " inner: map_inner!(", " self.inner,", " SymbolTableInternal,", " SymbolIteratorInternal,", " |x| x.symbols()", " ),", " }", " }", "", " fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol> {", " map_inner_option!(self.inner, SymbolTableInternal, SymbolInternal, |x| x", " .symbol_by_index(index))", " .map(|inner| Symbol { inner })", " }", "}", "", "/// An iterator over symbol table entries.", "#[derive(Debug)]", "pub struct SymbolIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SymbolIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SymbolIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSymbolIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSymbolIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSymbolIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSymbolIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSymbolIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(coff::CoffSymbolIterator<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(coff::CoffSymbolIterator<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSymbolIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SymbolIterator<'data, 'file> {", " type Item = Symbol<'data, 'file>;", "", " fn next(&mut self) -> Option<Self::Item> {", " next_inner!(self.inner, SymbolIteratorInternal, SymbolInternal)", " .map(|inner| Symbol { inner })", " }", "}", "", "/// A symbol table entry.", "pub struct Symbol<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SymbolInternal<'data, 'file>,", "}", "", "enum SymbolInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffSymbol<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSymbol32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSymbol64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachOSymbol32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachOSymbol64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(coff::CoffSymbol<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(coff::CoffSymbol<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmSymbol<'data, 'file>),", "}", "", "impl<'data, 'file> fmt::Debug for Symbol<'data, 'file> {", " fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {", " f.debug_struct(\"Symbol\")", " .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))", " .field(\"address\", &self.address())", " .field(\"size\", &self.size())", " .field(\"kind\", &self.kind())", " .field(\"section\", &self.section())", " .field(\"scope\", &self.scope())", " .field(\"weak\", &self.is_weak())", " .field(\"flags\", &self.flags())", " .finish()", " }", "}", "", "impl<'data, 'file> read::private::Sealed for Symbol<'data, 'file> {}", "", "impl<'data, 'file> ObjectSymbol<'data> for Symbol<'data, 'file> {", " fn index(&self) -> SymbolIndex {", " with_inner!(self.inner, SymbolInternal, |x| x.index())", " }", "", " fn name(&self) -> Result<&'data str> {", " with_inner!(self.inner, SymbolInternal, |x| x.name())", " }", "", " fn address(&self) -> u64 {", " with_inner!(self.inner, SymbolInternal, |x| x.address())", " }", "", " fn size(&self) -> u64 {", " with_inner!(self.inner, SymbolInternal, |x| x.size())", " }", "", " fn kind(&self) -> SymbolKind {", " with_inner!(self.inner, SymbolInternal, |x| x.kind())", " }", "", " fn section(&self) -> SymbolSection {", " with_inner!(self.inner, SymbolInternal, |x| x.section())", " }", "", " fn is_undefined(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_undefined())", " }", "", " fn is_definition(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_definition())", " }", "", " fn is_common(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_common())", " }", "", " fn is_weak(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_weak())", " }", "", " fn scope(&self) -> SymbolScope {", " with_inner!(self.inner, SymbolInternal, |x| x.scope())", " }", "", " fn is_global(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_global())", " }", "", " fn is_local(&self) -> bool {", " with_inner!(self.inner, SymbolInternal, |x| x.is_local())", " }", "", " fn flags(&self) -> SymbolFlags<SectionIndex> {", " with_inner!(self.inner, SymbolInternal, |x| x.flags())", " }", "}", "", "/// An iterator over dynamic relocation entries.", "#[derive(Debug)]", "pub struct DynamicRelocationIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: DynamicRelocationIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum DynamicRelocationIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfDynamicRelocationIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfDynamicRelocationIterator64<'data, 'file>),", " // We need to always use the lifetime parameters.", " #[allow(unused)]", " None(PhantomData<(&'data (), &'file ())>),", "}", "", "impl<'data, 'file> Iterator for DynamicRelocationIterator<'data, 'file> {", " type Item = (u64, Relocation);", "", " fn next(&mut self) -> Option<Self::Item> {", " match self.inner {", " #[cfg(feature = \"elf\")]", " DynamicRelocationIteratorInternal::Elf32(ref mut elf) => elf.next(),", " #[cfg(feature = \"elf\")]", " DynamicRelocationIteratorInternal::Elf64(ref mut elf) => elf.next(),", " DynamicRelocationIteratorInternal::None(_) => None,", " }", " }", "}", "", "/// An iterator over section relocation entries.", "#[derive(Debug)]", "pub struct SectionRelocationIterator<'data, 'file>", "where", " 'data: 'file,", "{", " inner: SectionRelocationIteratorInternal<'data, 'file>,", "}", "", "#[derive(Debug)]", "enum SectionRelocationIteratorInternal<'data, 'file>", "where", " 'data: 'file,", "{", " #[cfg(feature = \"coff\")]", " Coff(coff::CoffRelocationIterator<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf32(elf::ElfSectionRelocationIterator32<'data, 'file>),", " #[cfg(feature = \"elf\")]", " Elf64(elf::ElfSectionRelocationIterator64<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO32(macho::MachORelocationIterator32<'data, 'file>),", " #[cfg(feature = \"macho\")]", " MachO64(macho::MachORelocationIterator64<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe32(pe::PeRelocationIterator<'data, 'file>),", " #[cfg(feature = \"pe\")]", " Pe64(pe::PeRelocationIterator<'data, 'file>),", " #[cfg(feature = \"wasm\")]", " Wasm(wasm::WasmRelocationIterator<'data, 'file>),", "}", "", "impl<'data, 'file> Iterator for SectionRelocationIterator<'data, 'file> {", " type Item = (u64, Relocation);", "", " fn next(&mut self) -> Option<Self::Item> {", " with_inner_mut!(self.inner, SectionRelocationIteratorInternal, |x| x.next())", " }", "}", ""]}
11:30:21 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["LSP#position()"],"id":40}
11:30:21 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 40, "jsonrpc": "2.0", "result": {"character": 36, "line": 174}}
11:30:21 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"eval","params":["expand('<cword>')"],"id":41}
11:30:21 DEBUG reader-None src/rpcclient.rs:207 <= None {"id": 41, "jsonrpc": "2.0", "result": "parse"}
11:30:21 DEBUG writer-Some("rust") src/rpcclient.rs:254 => Some("rust") {"jsonrpc":"2.0","method":"textDocument/definition","params":{"bufnr":2,"character":36,"filename":"/home/antlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs","gotoCmd":null,"handle":true,"languageId":"rust","line":174,"method":"textDocument/definition","position":{"character":36,"line":174},"text":["use alloc::fmt;","use alloc::vec::Vec;","use core::marker::PhantomData;","","#[cfg(feature = \"coff\")]","use crate::read::coff;","#[cfg(feature = \"elf\")]","use crate::read::elf;","#[cfg(feature = \"macho\")]","use crate::read::macho;","#[cfg(feature = \"pe\")]","use crate::read::pe;","#[cfg(feature = \"wasm\")]","use crate::read::wasm;","use crate::read::{"," self, Architecture, BinaryFormat, ComdatKind, CompressedData, Error, Export, FileFlags,"," FileKind, Import, Object, ObjectComdat, ObjectMap, ObjectSection, ObjectSegment, ObjectSymbol,"," ObjectSymbolTable, Relocation, Result, SectionFlags, SectionIndex, SectionKind, SymbolFlags,"," SymbolIndex, SymbolKind, SymbolMap, SymbolMapName, SymbolScope, SymbolSection,","};","","/// Evaluate an expression on the contents of a file format enum.","///","/// This is a hack to avoid virtual calls.","macro_rules! with_inner {"," ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {"," match $inner {"," #[cfg(feature = \"coff\")]"," $enum::Coff(ref $var) => $body,"," #[cfg(feature = \"elf\")]"," $enum::Elf32(ref $var) => $body,"," #[cfg(feature = \"elf\")]"," $enum::Elf64(ref $var) => $body,"," #[cfg(feature = \"macho\")]"," $enum::MachO32(ref $var) => $body,"," #[cfg(feature = \"macho\")]"," $enum::MachO64(ref $var) => $body,"," #[cfg(feature = \"pe\")]"," $enum::Pe32(ref $var) => $body,"," #[cfg(feature = \"pe\")]"," $enum::Pe64(ref $var) => $body,"," #[cfg(feature = \"wasm\")]"," $enum::Wasm(ref $var) => $body,"," }"," };","}","","macro_rules! with_inner_mut {"," ($inner:expr, $enum:ident, | $var:ident | $body:expr) => {"," match $inner {"," #[cfg(feature = \"coff\")]"," $enum::Coff(ref mut $var) => $body,"," #[cfg(feature = \"elf\")]"," $enum::Elf32(ref mut $var) => $body,"," #[cfg(feature = \"elf\")]"," $enum::Elf64(ref mut $var) => $body,"," #[cfg(feature = \"macho\")]"," $enum::MachO32(ref mut $var) => $body,"," #[cfg(feature = \"macho\")]"," $enum::MachO64(ref mut $var) => $body,"," #[cfg(feature = \"pe\")]"," $enum::Pe32(ref mut $var) => $body,"," #[cfg(feature = \"pe\")]"," $enum::Pe64(ref mut $var) => $body,"," #[cfg(feature = \"wasm\")]"," $enum::Wasm(ref mut $var) => $body,"," }"," };","}","","/// Like `with_inner!`, but wraps the result in another enum.","macro_rules! map_inner {"," ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {"," match $inner {"," #[cfg(feature = \"coff\")]"," $from::Coff(ref $var) => $to::Coff($body),"," #[cfg(feature = \"elf\")]"," $from::Elf32(ref $var) => $to::Elf32($body),"," #[cfg(feature = \"elf\")]"," $from::Elf64(ref $var) => $to::Elf64($body),"," #[cfg(feature = \"macho\")]"," $from::MachO32(ref $var) => $to::MachO32($body),"," #[cfg(feature = \"macho\")]"," $from::MachO64(ref $var) => $to::MachO64($body),"," #[cfg(feature = \"pe\")]"," $from::Pe32(ref $var) => $to::Pe32($body),"," #[cfg(feature = \"pe\")]"," $from::Pe64(ref $var) => $to::Pe64($body),"," #[cfg(feature = \"wasm\")]"," $from::Wasm(ref $var) => $to::Wasm($body),"," }"," };","}","","/// Like `map_inner!`, but the result is a Result or Option.","macro_rules! map_inner_option {"," ($inner:expr, $from:ident, $to:ident, | $var:ident | $body:expr) => {"," match $inner {"," #[cfg(feature = \"coff\")]"," $from::Coff(ref $var) => $body.map($to::Coff),"," #[cfg(feature = \"elf\")]"," $from::Elf32(ref $var) => $body.map($to::Elf32),"," #[cfg(feature = \"elf\")]"," $from::Elf64(ref $var) => $body.map($to::Elf64),"," #[cfg(feature = \"macho\")]"," $from::MachO32(ref $var) => $body.map($to::MachO32),"," #[cfg(feature = \"macho\")]"," $from::MachO64(ref $var) => $body.map($to::MachO64),"," #[cfg(feature = \"pe\")]"," $from::Pe32(ref $var) => $body.map($to::Pe32),"," #[cfg(feature = \"pe\")]"," $from::Pe64(ref $var) => $body.map($to::Pe64),"," #[cfg(feature = \"wasm\")]"," $from::Wasm(ref $var) => $body.map($to::Wasm),"," }"," };","}","","/// Call `next` for a file format iterator.","macro_rules! next_inner {"," ($inner:expr, $from:ident, $to:ident) => {"," match $inner {"," #[cfg(feature = \"coff\")]"," $from::Coff(ref mut iter) => iter.next().map($to::Coff),"," #[cfg(feature = \"elf\")]"," $from::Elf32(ref mut iter) => iter.next().map($to::Elf32),"," #[cfg(feature = \"elf\")]"," $from::Elf64(ref mut iter) => iter.next().map($to::Elf64),"," #[cfg(feature = \"macho\")]"," $from::MachO32(ref mut iter) => iter.next().map($to::MachO32),"," #[cfg(feature = \"macho\")]"," $from::MachO64(ref mut iter) => iter.next().map($to::MachO64),"," #[cfg(feature = \"pe\")]"," $from::Pe32(ref mut iter) => iter.next().map($to::Pe32),"," #[cfg(feature = \"pe\")]"," $from::Pe64(ref mut iter) => iter.next().map($to::Pe64),"," #[cfg(feature = \"wasm\")]"," $from::Wasm(ref mut iter) => iter.next().map($to::Wasm),"," }"," };","}","","/// An object file.","///","/// Most functionality is provided by the `Object` trait implementation.","#[derive(Debug)]","pub struct File<'data> {"," inner: FileInternal<'data>,","}","","#[allow(clippy::large_enum_variant)]","#[derive(Debug)]","enum FileInternal<'data> {"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffFile<'data>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfFile32<'data>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfFile64<'data>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOFile32<'data>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOFile64<'data>),"," #[cfg(feature = \"pe\")]"," Pe32(pe::PeFile32<'data>),"," #[cfg(feature = \"pe\")]"," Pe64(pe::PeFile64<'data>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmFile<'data>),","}","","impl<'data> File<'data> {"," /// Parse the raw file data."," pub fn parse(data: &'data [u8]) -> Result<Self> {"," let inner = match FileKind::parse(data)? {"," #[cfg(feature = \"elf\")]"," FileKind::Elf32 => FileInternal::Elf32(elf::ElfFile32::parse(data)?),"," #[cfg(feature = \"elf\")]"," FileKind::Elf64 => FileInternal::Elf64(elf::ElfFile64::parse(data)?),"," #[cfg(feature = \"macho\")]"," FileKind::MachO32 => FileInternal::MachO32(macho::MachOFile32::parse(data)?),"," #[cfg(feature = \"macho\")]"," FileKind::MachO64 => FileInternal::MachO64(macho::MachOFile64::parse(data)?),"," #[cfg(feature = \"wasm\")]"," FileKind::Wasm => FileInternal::Wasm(wasm::WasmFile::parse(data)?),"," #[cfg(feature = \"pe\")]"," FileKind::Pe32 => FileInternal::Pe32(pe::PeFile32::parse(data)?),"," #[cfg(feature = \"pe\")]"," FileKind::Pe64 => FileInternal::Pe64(pe::PeFile64::parse(data)?),"," #[cfg(feature = \"coff\")]"," FileKind::Coff => FileInternal::Coff(coff::CoffFile::parse(data)?),"," _ => return Err(Error(\"Unsupported file format\")),"," };"," Ok(File { inner })"," }",""," /// Return the file format."," pub fn format(&self) -> BinaryFormat {"," match self.inner {"," #[cfg(feature = \"coff\")]"," FileInternal::Coff(_) => BinaryFormat::Coff,"," #[cfg(feature = \"elf\")]"," FileInternal::Elf32(_) | FileInternal::Elf64(_) => BinaryFormat::Elf,"," #[cfg(feature = \"macho\")]"," FileInternal::MachO32(_) | FileInternal::MachO64(_) => BinaryFormat::MachO,"," #[cfg(feature = \"pe\")]"," FileInternal::Pe32(_) | FileInternal::Pe64(_) => BinaryFormat::Pe,"," #[cfg(feature = \"wasm\")]"," FileInternal::Wasm(_) => BinaryFormat::Wasm,"," }"," }","}","","impl<'data> read::private::Sealed for File<'data> {}","","impl<'data, 'file> Object<'data, 'file> for File<'data>","where"," 'data: 'file,","{"," type Segment = Segment<'data, 'file>;"," type SegmentIterator = SegmentIterator<'data, 'file>;"," type Section = Section<'data, 'file>;"," type SectionIterator = SectionIterator<'data, 'file>;"," type Comdat = Comdat<'data, 'file>;"," type ComdatIterator = ComdatIterator<'data, 'file>;"," type Symbol = Symbol<'data, 'file>;"," type SymbolIterator = SymbolIterator<'data, 'file>;"," type SymbolTable = SymbolTable<'data, 'file>;"," type DynamicRelocationIterator = DynamicRelocationIterator<'data, 'file>;",""," fn architecture(&self) -> Architecture {"," with_inner!(self.inner, FileInternal, |x| x.architecture())"," }",""," fn is_little_endian(&self) -> bool {"," with_inner!(self.inner, FileInternal, |x| x.is_little_endian())"," }",""," fn is_64(&self) -> bool {"," with_inner!(self.inner, FileInternal, |x| x.is_64())"," }",""," fn segments(&'file self) -> SegmentIterator<'data, 'file> {"," SegmentIterator {"," inner: map_inner!(self.inner, FileInternal, SegmentIteratorInternal, |x| x"," .segments()),"," }"," }",""," fn section_by_name(&'file self, section_name: &str) -> Option<Section<'data, 'file>> {"," map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x"," .section_by_name(section_name))"," .map(|inner| Section { inner })"," }",""," fn section_by_index(&'file self, index: SectionIndex) -> Result<Section<'data, 'file>> {"," map_inner_option!(self.inner, FileInternal, SectionInternal, |x| x"," .section_by_index(index))"," .map(|inner| Section { inner })"," }",""," fn sections(&'file self) -> SectionIterator<'data, 'file> {"," SectionIterator {"," inner: map_inner!(self.inner, FileInternal, SectionIteratorInternal, |x| x"," .sections()),"," }"," }",""," fn comdats(&'file self) -> ComdatIterator<'data, 'file> {"," ComdatIterator {"," inner: map_inner!(self.inner, FileInternal, ComdatIteratorInternal, |x| x"," .comdats()),"," }"," }",""," fn symbol_by_index(&'file self, index: SymbolIndex) -> Result<Symbol<'data, 'file>> {"," map_inner_option!(self.inner, FileInternal, SymbolInternal, |x| x"," .symbol_by_index(index))"," .map(|inner| Symbol { inner })"," }",""," fn symbols(&'file self) -> SymbolIterator<'data, 'file> {"," SymbolIterator {"," inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x"," .symbols()),"," }"," }",""," fn symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {"," map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x"," .symbol_table())"," .map(|inner| SymbolTable { inner })"," }",""," fn dynamic_symbols(&'file self) -> SymbolIterator<'data, 'file> {"," SymbolIterator {"," inner: map_inner!(self.inner, FileInternal, SymbolIteratorInternal, |x| x"," .dynamic_symbols()),"," }"," }",""," fn dynamic_symbol_table(&'file self) -> Option<SymbolTable<'data, 'file>> {"," map_inner_option!(self.inner, FileInternal, SymbolTableInternal, |x| x"," .dynamic_symbol_table())"," .map(|inner| SymbolTable { inner })"," }",""," #[cfg(feature = \"elf\")]"," fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {"," let inner = match self.inner {"," FileInternal::Elf32(ref elf) => {"," DynamicRelocationIteratorInternal::Elf32(elf.dynamic_relocations()?)"," }"," FileInternal::Elf64(ref elf) => {"," DynamicRelocationIteratorInternal::Elf64(elf.dynamic_relocations()?)"," }"," _ => return None,"," };"," Some(DynamicRelocationIterator { inner })"," }",""," #[cfg(not(feature = \"elf\"))]"," fn dynamic_relocations(&'file self) -> Option<DynamicRelocationIterator<'data, 'file>> {"," None"," }",""," fn symbol_map(&self) -> SymbolMap<SymbolMapName<'data>> {"," with_inner!(self.inner, FileInternal, |x| x.symbol_map())"," }",""," fn object_map(&self) -> ObjectMap<'data> {"," with_inner!(self.inner, FileInternal, |x| x.object_map())"," }",""," fn imports(&self) -> Result<Vec<Import<'data>>> {"," with_inner!(self.inner, FileInternal, |x| x.imports())"," }",""," fn exports(&self) -> Result<Vec<Export<'data>>> {"," with_inner!(self.inner, FileInternal, |x| x.exports())"," }",""," fn has_debug_symbols(&self) -> bool {"," with_inner!(self.inner, FileInternal, |x| x.has_debug_symbols())"," }",""," #[inline]"," fn mach_uuid(&self) -> Result<Option<[u8; 16]>> {"," with_inner!(self.inner, FileInternal, |x| x.mach_uuid())"," }",""," #[inline]"," fn build_id(&self) -> Result<Option<&'data [u8]>> {"," with_inner!(self.inner, FileInternal, |x| x.build_id())"," }",""," #[inline]"," fn gnu_debuglink(&self) -> Result<Option<(&'data [u8], u32)>> {"," with_inner!(self.inner, FileInternal, |x| x.gnu_debuglink())"," }",""," fn entry(&self) -> u64 {"," with_inner!(self.inner, FileInternal, |x| x.entry())"," }",""," fn flags(&self) -> FileFlags {"," with_inner!(self.inner, FileInternal, |x| x.flags())"," }","}","","/// An iterator over the segments of a `File`.","#[derive(Debug)]","pub struct SegmentIterator<'data, 'file>","where"," 'data: 'file,","{"," inner: SegmentIteratorInternal<'data, 'file>,","}","","#[derive(Debug)]","enum SegmentIteratorInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffSegmentIterator<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfSegmentIterator32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfSegmentIterator64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOSegmentIterator32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOSegmentIterator64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(pe::PeSegmentIterator32<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(pe::PeSegmentIterator64<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmSegmentIterator<'data, 'file>),","}","","impl<'data, 'file> Iterator for SegmentIterator<'data, 'file> {"," type Item = Segment<'data, 'file>;",""," fn next(&mut self) -> Option<Self::Item> {"," next_inner!(self.inner, SegmentIteratorInternal, SegmentInternal)"," .map(|inner| Segment { inner })"," }","}","","/// A segment of a `File`.","pub struct Segment<'data, 'file>","where"," 'data: 'file,","{"," inner: SegmentInternal<'data, 'file>,","}","","#[derive(Debug)]","enum SegmentInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffSegment<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfSegment32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfSegment64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOSegment32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOSegment64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(pe::PeSegment32<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(pe::PeSegment64<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmSegment<'data, 'file>),","}","","impl<'data, 'file> fmt::Debug for Segment<'data, 'file> {"," fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {"," // It's painful to do much better than this"," let mut s = f.debug_struct(\"Segment\");"," match self.name() {"," Ok(Some(ref name)) => {"," s.field(\"name\", name);"," }"," Ok(None) => {}"," Err(_) => {"," s.field(\"name\", &\"<invalid>\");"," }"," }"," s.field(\"address\", &self.address())"," .field(\"size\", &self.size())"," .finish()"," }","}","","impl<'data, 'file> read::private::Sealed for Segment<'data, 'file> {}","","impl<'data, 'file> ObjectSegment<'data> for Segment<'data, 'file> {"," fn address(&self) -> u64 {"," with_inner!(self.inner, SegmentInternal, |x| x.address())"," }",""," fn size(&self) -> u64 {"," with_inner!(self.inner, SegmentInternal, |x| x.size())"," }",""," fn align(&self) -> u64 {"," with_inner!(self.inner, SegmentInternal, |x| x.align())"," }",""," fn file_range(&self) -> (u64, u64) {"," with_inner!(self.inner, SegmentInternal, |x| x.file_range())"," }",""," fn data(&self) -> Result<&'data [u8]> {"," with_inner!(self.inner, SegmentInternal, |x| x.data())"," }",""," fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {"," with_inner!(self.inner, SegmentInternal, |x| x.data_range(address, size))"," }",""," fn name(&self) -> Result<Option<&str>> {"," with_inner!(self.inner, SegmentInternal, |x| x.name())"," }","}","","/// An iterator of the sections of a `File`.","#[derive(Debug)]","pub struct SectionIterator<'data, 'file>","where"," 'data: 'file,","{"," inner: SectionIteratorInternal<'data, 'file>,","}","","// we wrap our enums in a struct so that they are kept private.","#[derive(Debug)]","enum SectionIteratorInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffSectionIterator<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfSectionIterator32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfSectionIterator64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOSectionIterator32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOSectionIterator64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(pe::PeSectionIterator32<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(pe::PeSectionIterator64<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmSectionIterator<'data, 'file>),","}","","impl<'data, 'file> Iterator for SectionIterator<'data, 'file> {"," type Item = Section<'data, 'file>;",""," fn next(&mut self) -> Option<Self::Item> {"," next_inner!(self.inner, SectionIteratorInternal, SectionInternal)"," .map(|inner| Section { inner })"," }","}","","/// A Section of a File","pub struct Section<'data, 'file>","where"," 'data: 'file,","{"," inner: SectionInternal<'data, 'file>,","}","","enum SectionInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffSection<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfSection32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfSection64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOSection32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOSection64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(pe::PeSection32<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(pe::PeSection64<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmSection<'data, 'file>),","}","","impl<'data, 'file> fmt::Debug for Section<'data, 'file> {"," fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {"," // It's painful to do much better than this"," let mut s = f.debug_struct(\"Section\");"," match self.segment_name() {"," Ok(Some(ref name)) => {"," s.field(\"segment\", name);"," }"," Ok(None) => {}"," Err(_) => {"," s.field(\"segment\", &\"<invalid>\");"," }"," }"," s.field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"," .field(\"address\", &self.address())"," .field(\"size\", &self.size())"," .field(\"align\", &self.align())"," .field(\"kind\", &self.kind())"," .field(\"flags\", &self.flags())"," .finish()"," }","}","","impl<'data, 'file> read::private::Sealed for Section<'data, 'file> {}","","impl<'data, 'file> ObjectSection<'data> for Section<'data, 'file> {"," type RelocationIterator = SectionRelocationIterator<'data, 'file>;",""," fn index(&self) -> SectionIndex {"," with_inner!(self.inner, SectionInternal, |x| x.index())"," }",""," fn address(&self) -> u64 {"," with_inner!(self.inner, SectionInternal, |x| x.address())"," }",""," fn size(&self) -> u64 {"," with_inner!(self.inner, SectionInternal, |x| x.size())"," }",""," fn align(&self) -> u64 {"," with_inner!(self.inner, SectionInternal, |x| x.align())"," }",""," fn file_range(&self) -> Option<(u64, u64)> {"," with_inner!(self.inner, SectionInternal, |x| x.file_range())"," }",""," fn data(&self) -> Result<&'data [u8]> {"," with_inner!(self.inner, SectionInternal, |x| x.data())"," }",""," fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>> {"," with_inner!(self.inner, SectionInternal, |x| x.data_range(address, size))"," }",""," fn compressed_data(&self) -> Result<CompressedData<'data>> {"," with_inner!(self.inner, SectionInternal, |x| x.compressed_data())"," }",""," fn name(&self) -> Result<&str> {"," with_inner!(self.inner, SectionInternal, |x| x.name())"," }",""," fn segment_name(&self) -> Result<Option<&str>> {"," with_inner!(self.inner, SectionInternal, |x| x.segment_name())"," }",""," fn kind(&self) -> SectionKind {"," with_inner!(self.inner, SectionInternal, |x| x.kind())"," }",""," fn relocations(&self) -> SectionRelocationIterator<'data, 'file> {"," SectionRelocationIterator {"," inner: map_inner!("," self.inner,"," SectionInternal,"," SectionRelocationIteratorInternal,"," |x| x.relocations()"," ),"," }"," }",""," fn flags(&self) -> SectionFlags {"," with_inner!(self.inner, SectionInternal, |x| x.flags())"," }","}","","/// An iterator of the COMDAT section groups of a `File`.","#[derive(Debug)]","pub struct ComdatIterator<'data, 'file>","where"," 'data: 'file,","{"," inner: ComdatIteratorInternal<'data, 'file>,","}","","#[derive(Debug)]","enum ComdatIteratorInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffComdatIterator<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfComdatIterator32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfComdatIterator64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOComdatIterator32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOComdatIterator64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(pe::PeComdatIterator32<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(pe::PeComdatIterator64<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmComdatIterator<'data, 'file>),","}","","impl<'data, 'file> Iterator for ComdatIterator<'data, 'file> {"," type Item = Comdat<'data, 'file>;",""," fn next(&mut self) -> Option<Self::Item> {"," next_inner!(self.inner, ComdatIteratorInternal, ComdatInternal)"," .map(|inner| Comdat { inner })"," }","}","","/// A COMDAT section group of a `File`.","pub struct Comdat<'data, 'file>","where"," 'data: 'file,","{"," inner: ComdatInternal<'data, 'file>,","}","","enum ComdatInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffComdat<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfComdat32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfComdat64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOComdat32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOComdat64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(pe::PeComdat32<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(pe::PeComdat64<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmComdat<'data, 'file>),","}","","impl<'data, 'file> fmt::Debug for Comdat<'data, 'file> {"," fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {"," let mut s = f.debug_struct(\"Comdat\");"," s.field(\"symbol\", &self.symbol())"," .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"," .field(\"kind\", &self.kind())"," .finish()"," }","}","","impl<'data, 'file> read::private::Sealed for Comdat<'data, 'file> {}","","impl<'data, 'file> ObjectComdat<'data> for Comdat<'data, 'file> {"," type SectionIterator = ComdatSectionIterator<'data, 'file>;",""," fn kind(&self) -> ComdatKind {"," with_inner!(self.inner, ComdatInternal, |x| x.kind())"," }",""," fn symbol(&self) -> SymbolIndex {"," with_inner!(self.inner, ComdatInternal, |x| x.symbol())"," }",""," fn name(&self) -> Result<&str> {"," with_inner!(self.inner, ComdatInternal, |x| x.name())"," }",""," fn sections(&self) -> ComdatSectionIterator<'data, 'file> {"," ComdatSectionIterator {"," inner: map_inner!("," self.inner,"," ComdatInternal,"," ComdatSectionIteratorInternal,"," |x| x.sections()"," ),"," }"," }","}","","/// An iterator over COMDAT section entries.","#[derive(Debug)]","pub struct ComdatSectionIterator<'data, 'file>","where"," 'data: 'file,","{"," inner: ComdatSectionIteratorInternal<'data, 'file>,","}","","#[derive(Debug)]","enum ComdatSectionIteratorInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffComdatSectionIterator<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfComdatSectionIterator32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfComdatSectionIterator64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOComdatSectionIterator32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOComdatSectionIterator64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(pe::PeComdatSectionIterator32<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(pe::PeComdatSectionIterator64<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmComdatSectionIterator<'data, 'file>),","}","","impl<'data, 'file> Iterator for ComdatSectionIterator<'data, 'file> {"," type Item = SectionIndex;",""," fn next(&mut self) -> Option<Self::Item> {"," with_inner_mut!(self.inner, ComdatSectionIteratorInternal, |x| x.next())"," }","}","","/// A symbol table.","#[derive(Debug)]","pub struct SymbolTable<'data, 'file>","where"," 'data: 'file,","{"," inner: SymbolTableInternal<'data, 'file>,","}","","#[derive(Debug)]","enum SymbolTableInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffSymbolTable<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfSymbolTable32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfSymbolTable64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOSymbolTable32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOSymbolTable64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(coff::CoffSymbolTable<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(coff::CoffSymbolTable<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmSymbolTable<'data, 'file>),","}","","impl<'data, 'file> read::private::Sealed for SymbolTable<'data, 'file> {}","","impl<'data, 'file> ObjectSymbolTable<'data> for SymbolTable<'data, 'file> {"," type Symbol = Symbol<'data, 'file>;"," type SymbolIterator = SymbolIterator<'data, 'file>;",""," fn symbols(&self) -> Self::SymbolIterator {"," SymbolIterator {"," inner: map_inner!("," self.inner,"," SymbolTableInternal,"," SymbolIteratorInternal,"," |x| x.symbols()"," ),"," }"," }",""," fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol> {"," map_inner_option!(self.inner, SymbolTableInternal, SymbolInternal, |x| x"," .symbol_by_index(index))"," .map(|inner| Symbol { inner })"," }","}","","/// An iterator over symbol table entries.","#[derive(Debug)]","pub struct SymbolIterator<'data, 'file>","where"," 'data: 'file,","{"," inner: SymbolIteratorInternal<'data, 'file>,","}","","#[derive(Debug)]","enum SymbolIteratorInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffSymbolIterator<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfSymbolIterator32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfSymbolIterator64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOSymbolIterator32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOSymbolIterator64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(coff::CoffSymbolIterator<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(coff::CoffSymbolIterator<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmSymbolIterator<'data, 'file>),","}","","impl<'data, 'file> Iterator for SymbolIterator<'data, 'file> {"," type Item = Symbol<'data, 'file>;",""," fn next(&mut self) -> Option<Self::Item> {"," next_inner!(self.inner, SymbolIteratorInternal, SymbolInternal)"," .map(|inner| Symbol { inner })"," }","}","","/// A symbol table entry.","pub struct Symbol<'data, 'file>","where"," 'data: 'file,","{"," inner: SymbolInternal<'data, 'file>,","}","","enum SymbolInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffSymbol<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfSymbol32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfSymbol64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachOSymbol32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachOSymbol64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(coff::CoffSymbol<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(coff::CoffSymbol<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmSymbol<'data, 'file>),","}","","impl<'data, 'file> fmt::Debug for Symbol<'data, 'file> {"," fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {"," f.debug_struct(\"Symbol\")"," .field(\"name\", &self.name().unwrap_or(\"<invalid>\"))"," .field(\"address\", &self.address())"," .field(\"size\", &self.size())"," .field(\"kind\", &self.kind())"," .field(\"section\", &self.section())"," .field(\"scope\", &self.scope())"," .field(\"weak\", &self.is_weak())"," .field(\"flags\", &self.flags())"," .finish()"," }","}","","impl<'data, 'file> read::private::Sealed for Symbol<'data, 'file> {}","","impl<'data, 'file> ObjectSymbol<'data> for Symbol<'data, 'file> {"," fn index(&self) -> SymbolIndex {"," with_inner!(self.inner, SymbolInternal, |x| x.index())"," }",""," fn name(&self) -> Result<&'data str> {"," with_inner!(self.inner, SymbolInternal, |x| x.name())"," }",""," fn address(&self) -> u64 {"," with_inner!(self.inner, SymbolInternal, |x| x.address())"," }",""," fn size(&self) -> u64 {"," with_inner!(self.inner, SymbolInternal, |x| x.size())"," }",""," fn kind(&self) -> SymbolKind {"," with_inner!(self.inner, SymbolInternal, |x| x.kind())"," }",""," fn section(&self) -> SymbolSection {"," with_inner!(self.inner, SymbolInternal, |x| x.section())"," }",""," fn is_undefined(&self) -> bool {"," with_inner!(self.inner, SymbolInternal, |x| x.is_undefined())"," }",""," fn is_definition(&self) -> bool {"," with_inner!(self.inner, SymbolInternal, |x| x.is_definition())"," }",""," fn is_common(&self) -> bool {"," with_inner!(self.inner, SymbolInternal, |x| x.is_common())"," }",""," fn is_weak(&self) -> bool {"," with_inner!(self.inner, SymbolInternal, |x| x.is_weak())"," }",""," fn scope(&self) -> SymbolScope {"," with_inner!(self.inner, SymbolInternal, |x| x.scope())"," }",""," fn is_global(&self) -> bool {"," with_inner!(self.inner, SymbolInternal, |x| x.is_global())"," }",""," fn is_local(&self) -> bool {"," with_inner!(self.inner, SymbolInternal, |x| x.is_local())"," }",""," fn flags(&self) -> SymbolFlags<SectionIndex> {"," with_inner!(self.inner, SymbolInternal, |x| x.flags())"," }","}","","/// An iterator over dynamic relocation entries.","#[derive(Debug)]","pub struct DynamicRelocationIterator<'data, 'file>","where"," 'data: 'file,","{"," inner: DynamicRelocationIteratorInternal<'data, 'file>,","}","","#[derive(Debug)]","enum DynamicRelocationIteratorInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfDynamicRelocationIterator32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfDynamicRelocationIterator64<'data, 'file>),"," // We need to always use the lifetime parameters."," #[allow(unused)]"," None(PhantomData<(&'data (), &'file ())>),","}","","impl<'data, 'file> Iterator for DynamicRelocationIterator<'data, 'file> {"," type Item = (u64, Relocation);",""," fn next(&mut self) -> Option<Self::Item> {"," match self.inner {"," #[cfg(feature = \"elf\")]"," DynamicRelocationIteratorInternal::Elf32(ref mut elf) => elf.next(),"," #[cfg(feature = \"elf\")]"," DynamicRelocationIteratorInternal::Elf64(ref mut elf) => elf.next(),"," DynamicRelocationIteratorInternal::None(_) => None,"," }"," }","}","","/// An iterator over section relocation entries.","#[derive(Debug)]","pub struct SectionRelocationIterator<'data, 'file>","where"," 'data: 'file,","{"," inner: SectionRelocationIteratorInternal<'data, 'file>,","}","","#[derive(Debug)]","enum SectionRelocationIteratorInternal<'data, 'file>","where"," 'data: 'file,","{"," #[cfg(feature = \"coff\")]"," Coff(coff::CoffRelocationIterator<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf32(elf::ElfSectionRelocationIterator32<'data, 'file>),"," #[cfg(feature = \"elf\")]"," Elf64(elf::ElfSectionRelocationIterator64<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO32(macho::MachORelocationIterator32<'data, 'file>),"," #[cfg(feature = \"macho\")]"," MachO64(macho::MachORelocationIterator64<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe32(pe::PeRelocationIterator<'data, 'file>),"," #[cfg(feature = \"pe\")]"," Pe64(pe::PeRelocationIterator<'data, 'file>),"," #[cfg(feature = \"wasm\")]"," Wasm(wasm::WasmRelocationIterator<'data, 'file>),","}","","impl<'data, 'file> Iterator for SectionRelocationIterator<'data, 'file> {"," type Item = (u64, Relocation);",""," fn next(&mut self) -> Option<Self::Item> {"," with_inner_mut!(self.inner, SectionRelocationIteratorInternal, |x| x.next())"," }","}",""],"textDocument":{"uri":"file:///mnt/home/wantlord/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/any.rs"}},"id":2}
11:30:21 DEBUG reader-Some("rust") src/rpcclient.rs:207 <= Some("rust") {"jsonrpc":"2.0","id":2,"result":[]}
11:30:21 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","method":"s:Echowarn","params":["Not found!"]}
11:30:21 DEBUG writer-None src/rpcclient.rs:254 => None {"jsonrpc":"2.0","result":[],"id":2}
11:30:24 INFO reader-None src/rpcclient.rs:241 reader-None terminated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment