Skip to content

Instantly share code, notes, and snippets.

@prabirshrestha
Created April 16, 2022 21:02
Show Gist options
  • Save prabirshrestha/74d69fe9df0a85126727e99d09ddecbb to your computer and use it in GitHub Desktop.
Save prabirshrestha/74d69fe9df0a85126727e99d09ddecbb to your computer and use it in GitHub Desktop.
native client lsp log
https://github.com/vim/vim/pull/10025
--------------
==== start log session ====
0.057482 : raw terminal output: "[?1049h[>4;2m[?1h=[?2004h[?1004h"
0.057531 : raw terminal output: "[?12h[?12l"
0.124131 : raw terminal output: "▽"
0.124184 : raw terminal output: " Pzz\[0%m"
0.124226 : raw terminal output: "[>c"
0.124259 : raw terminal output: "]10;?]11;?"
0.124282 : raw key input: ""
0.125158 : raw key input: "[>1;277;0c]10;rgb:8383/9494/9696\]11;rgb:0000/2b2b/3636\"
0.157051 : Starting job: /usr/bin/rust-analyzer
0.157084 on 0: Created channel
0.158065 : closing logfile /home/prabirshrestha/.config/nvim/data/channel.log
0.167850 SEND on 0(in): 'Content-Length: 2105
Content-Type: application/vim-jsonrpc; charset=utf-8
{"method":"initialize","jsonrpc":"2.0","id":1,"params":{"rootUri":"file:///home/prabirshrestha/code/tmp/helloworld","initializationOptions":{"completion":{"autoimport":{"enable":true}}},"capabilities":{"workspace":{"workspaceFolders":false,"configuration":true,"applyEdit":true},"window":{"workDoneProgress":true},"textDocument":{"semanticHighlightingCapabilities":{"semanticHighlighting":false},"codeAction":{"isPreferredSupport":true,"disabledSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":false},"completion":{"completionItem":{"snippetSupport":true,"resolveSupport":{"properties":["additionalTextEdits"]},"documentationFormat":["markdown","plaintext"]},"dynamicRegistration":false,"completionItemKind":{"valueSet":[10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,1,2,3,4,5,6,7,8,9]}},"formatting":{"dynamicRegistration":false},"codeLens":{"dynamicRegistration":false},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"rangeFormatting":{"dynamicRegistration":false},"declaration":{"dynamicRegistration":false,"linkSupport":true},"references":{"dynamicRegistration":false},"typeHierarchy":false,"foldingRange":{"rangeLimit":5000,"dynamicRegistration":false,"lineFoldingOnly":true},"documentSymbol":{"symbolKind":{"valueSet":[10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,1,2,3,4,5,6,7,8,9]},"dynamicRegistration":false,"labelSupport":false,"hierarchicalDocumentSymbolSupport":false},"publishDiagnostics":{"relatedInformation":true},"synchronization":{"dynamicRegistration":false,"willSaveWaitUntil":false,"willSave":false,"didSave":true},"documentHighlight":{"dynamicRegistration":false},"implementation":{"dynamicRegistration":false,"linkSupport":true},"typeDefinition":{"dynamicRegistration":false,"linkSupport":true},"definition":{"dynamicRegistration":false,"linkSupport":true}}},"rootPath":"/home/prabirshrestha/code/tmp/helloworld","clientInfo":{"name":"vim-lsp"},"processId":61795,"trace":"off"}}'
0.169334 RECV on 0(out): 'Content-Length: 2513
{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"selectionRangeProvider":true,"hoverProvider":true,"completionProvider":{"resolveProvider":true,"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,"documentRangeFormattingProvider":false,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"=","moreTriggerCharacter":[".",">","{"]},"renameProvider":{"prepareProvider":true},"foldingRangeProvider":true,"declarationProvider":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","arithmetic","attribute","attributeBracket","bitwise","boolean","brace","bracket","builtinAttribute","builtinType","character","colon","comma","comparison","constParameter","derive","dot","escapeSequence","formatSpecifier","generic","label","lifetime","logical","macroBang","operator","parenthesis","punctuation","selfKeyword","selfTypeKeyword","semicolon","typeAlias","toolModule","union","unresolvedReference"],"tokenModifiers":["documentation","declaration","definition","static","abstract","deprecated","readonly","defaultLibrary","async","attribute","callable","constant","consuming","controlFlow","crateRoot","injected","intraDocLink","library","mutable","public","reference","trait","unsafe"]},"range":true,"full":{"delta":true}},"experimental":{"externalDocs":true,"hoverRange":true,"inlayHints":true,"joinLines":true,"matchingBrace":true,"moveItem":true,"onEnter":true,"openCargoToml":true,"parentModule":true,"runnables":{"kinds":["cargo"]},"ssr":true,"workspaceSymbolScopeKindFiltering":true}},"serverInfo":{"name":"rust-analyzer","version":"2022-04-11"}}}'
0.170752 : SafeState: Start triggering
0.171798 : raw terminal output: " 2  println!("Hello, world!");   3    NORMAL  unix | utf-8 | rust  75%  3:4 [?25hP+q436f\P+q6b75\P+q6b64\P+q6b72\P+q6b6c\P+q2332\P+q2334\P+q2569\P+q2a37\P+q6b31\"
0.171861 : raw terminal output: "[?1000l[?1006h[?1002h[?1006l[?1002l[?1006h[?1002h[?12$p"
0.171932 : looking for messages on channels
0.172033 on 0: Invoking one-time callback <SNR>172_on_response_native
0.176888 SEND on 0(in): 'Content-Length: 52
Content-Type: application/vim-jsonrpc; charset=utf-8
{"method":"initialized","jsonrpc":"2.0","params":{}}'
0.178355 SEND on 0(in): 'Content-Length: 86
Content-Type: application/vim-jsonrpc; charset=utf-8
{"method":"workspace/didChangeConfiguration","jsonrpc":"2.0","params":{"settings":{}}}'
0.180179 RECV on 0(out): 'Content-Length: 109
{"jsonrpc":"2.0","id":0,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Fetching"}}Content-Length: 126
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"begin","title":"Fetching"}}}Content-Length: 108
{"jsonrpc":"2.0","id":1,"method":"workspace/configuration","params":{"items":[{"section":"rust-analyzer"}]}}'
0.183549 SEND on 0(in): 'Content-Length: 243
Content-Type: application/vim-jsonrpc; charset=utf-8
{"method":"textDocument/didOpen","jsonrpc":"2.0","params":{"textDocument":{"uri":"file:///home/prabirshrestha/code/tmp/helloworld/src/main.rs","version":1,"languageId":"rust","text":"fn main() {\n println!(\"Hello, world!\");\n \n}\n"}}}'
0.188888 on 0: Invoking channel callback <SNR>172_native_out_cb
0.189993 on 0: Invoking channel callback <SNR>172_native_out_cb
0.191071 on 0: Invoking channel callback <SNR>172_native_out_cb
0.192851 : SafeState: back to waiting, triggering SafeStateAgain
0.224642 RECV on 0(out): 'Content-Length: 129
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"report","message":"metadata"}}}'
0.224652 : looking for messages on channels
0.224701 on 0: Invoking channel callback <SNR>172_native_out_cb
0.227883 : SafeState: back to waiting, triggering SafeStateAgain
0.300322 RECV on 0(out): 'Content-Length: 105
'
0.300334 : looking for messages on channels
0.300394 on 0: Incomplete message (23 bytes) - wait 100 msec for more
0.300413 : SafeState: back to waiting, triggering SafeStateAgain
0.300428 on 0: still waiting on incomplete message
0.300442 on 0: still waiting on incomplete message
0.300503 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"end"}}}'
0.300507 : looking for messages on channels
0.300522 on 0: still waiting on incomplete message
0.300534 : SafeState: back to waiting, triggering SafeStateAgain
0.300555 on 0: still waiting on incomplete message
0.300567 on 0: still waiting on incomplete message
0.300614 RECV on 0(out): 'Content-Length: 114
'
0.300617 : looking for messages on channels
0.300632 on 0: still waiting on incomplete message
0.300644 : SafeState: back to waiting, triggering SafeStateAgain
0.300655 on 0: still waiting on incomplete message
0.300665 on 0: still waiting on incomplete message
0.300702 RECV on 0(out): '{"jsonrpc":"2.0","id":2,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Roots Scanned"}}'
0.300706 : looking for messages on channels
0.300729 on 0: still waiting on incomplete message
0.300742 : SafeState: back to waiting, triggering SafeStateAgain
0.300752 on 0: still waiting on incomplete message
0.300762 on 0: still waiting on incomplete message
0.300840 RECV on 0(out): 'Content-Length: 167
'
0.300844 : looking for messages on channels
0.300858 on 0: still waiting on incomplete message
0.300878 : SafeState: back to waiting, triggering SafeStateAgain
0.300888 on 0: still waiting on incomplete message
0.300898 on 0: still waiting on incomplete message
0.300936 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"begin","title":"Roots Scanned","message":"0/2","percentage":0}}}'
0.300939 : looking for messages on channels
0.300953 on 0: still waiting on incomplete message
0.300964 : SafeState: back to waiting, triggering SafeStateAgain
0.300984 on 0: still waiting on incomplete message
0.300995 on 0: still waiting on incomplete message
0.301038 RECV on 0(out): 'Content-Length: 145
'
0.301042 : looking for messages on channels
0.301073 on 0: still waiting on incomplete message
0.301084 : SafeState: back to waiting, triggering SafeStateAgain
0.301094 on 0: still waiting on incomplete message
0.301104 on 0: still waiting on incomplete message
0.301143 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"1/2","percentage":50}}}'
0.301147 : looking for messages on channels
0.301170 on 0: still waiting on incomplete message
0.301181 : SafeState: back to waiting, triggering SafeStateAgain
0.301191 on 0: still waiting on incomplete message
0.301202 on 0: still waiting on incomplete message
0.301277 RECV on 0(out): 'Content-Length: 109
'
0.301281 : looking for messages on channels
0.301306 on 0: still waiting on incomplete message
0.301320 : SafeState: back to waiting, triggering SafeStateAgain
0.301330 on 0: still waiting on incomplete message
0.301341 on 0: still waiting on incomplete message
0.301379 RECV on 0(out): '{"jsonrpc":"2.0","id":3,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Fetching"}}'
0.301383 : looking for messages on channels
0.301397 on 0: still waiting on incomplete message
0.301408 : SafeState: back to waiting, triggering SafeStateAgain
0.301427 on 0: still waiting on incomplete message
0.301437 on 0: still waiting on incomplete message
0.301477 RECV on 0(out): 'Content-Length: 126
'
0.301480 : looking for messages on channels
0.301494 on 0: still waiting on incomplete message
0.301505 : SafeState: back to waiting, triggering SafeStateAgain
0.301515 on 0: still waiting on incomplete message
0.301525 on 0: still waiting on incomplete message
0.301561 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"begin","title":"Fetching"}}}'
0.301565 : looking for messages on channels
0.301588 on 0: still waiting on incomplete message
0.301600 : SafeState: back to waiting, triggering SafeStateAgain
0.301610 on 0: still waiting on incomplete message
0.301621 on 0: still waiting on incomplete message
0.301987 RECV on 0(out): 'Content-Length: 108
'
0.301993 : looking for messages on channels
0.302013 on 0: still waiting on incomplete message
0.302038 : SafeState: back to waiting, triggering SafeStateAgain
0.302050 on 0: still waiting on incomplete message
0.302062 on 0: still waiting on incomplete message
0.302104 RECV on 0(out): '{"jsonrpc":"2.0","id":4,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Loading"}}'
0.302108 : looking for messages on channels
0.302124 on 0: still waiting on incomplete message
0.302135 : SafeState: back to waiting, triggering SafeStateAgain
0.302144 on 0: still waiting on incomplete message
0.302163 on 0: still waiting on incomplete message
0.302203 RECV on 0(out): 'Content-Length: 124
'
0.302206 : looking for messages on channels
0.302219 on 0: still waiting on incomplete message
0.302230 : SafeState: back to waiting, triggering SafeStateAgain
0.302240 on 0: still waiting on incomplete message
0.302250 on 0: still waiting on incomplete message
0.302286 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Loading","value":{"kind":"begin","title":"Loading"}}}'
0.302289 : looking for messages on channels
0.302313 on 0: still waiting on incomplete message
0.302325 : SafeState: back to waiting, triggering SafeStateAgain
0.302336 on 0: still waiting on incomplete message
0.302346 on 0: still waiting on incomplete message
0.358852 RECV on 0(out): 'Content-Length: 126
'
0.358868 : looking for messages on channels
0.358952 on 0: still waiting on incomplete message
0.358971 : SafeState: back to waiting, triggering SafeStateAgain
0.359035 on 0: still waiting on incomplete message
0.359051 on 0: still waiting on incomplete message
0.359144 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"end","message":"2/2"}}}'
0.359150 : looking for messages on channels
0.359169 on 0: still waiting on incomplete message
0.359181 : SafeState: back to waiting, triggering SafeStateAgain
0.359193 on 0: still waiting on incomplete message
0.359220 on 0: still waiting on incomplete message
0.370438 on 0: still waiting on incomplete message
0.394907 RECV on 0(out): 'Content-Length: 129
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"report","message":"metadata"}}}'
0.394918 : looking for messages on channels
0.394967 on 0: still waiting on incomplete message
0.394982 : SafeState: back to waiting, triggering SafeStateAgain
0.394993 on 0: still waiting on incomplete message
0.472121 : looking for messages on channels
0.472188 on 0: timed out
0.472200 ERR on 0: Decoding failed - discarding input
0.472213 : SafeState: back to waiting, triggering SafeStateAgain
0.475192 : looking for messages on channels
0.475245 on 0: Incomplete message (105 bytes) - wait 100 msec for more
0.475262 : SafeState: back to waiting, triggering SafeStateAgain
0.475273 on 0: still waiting on incomplete message
0.475284 on 0: still waiting on incomplete message
0.477279 RECV on 0(out): 'Content-Length: 105
'
0.477289 : looking for messages on channels
0.477349 on 0: still waiting on incomplete message
0.477364 : SafeState: back to waiting, triggering SafeStateAgain
0.477375 on 0: still waiting on incomplete message
0.477385 on 0: still waiting on incomplete message
0.477614 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"end"}}}'
0.477619 : looking for messages on channels
0.477637 on 0: still waiting on incomplete message
0.477661 : SafeState: back to waiting, triggering SafeStateAgain
0.477671 on 0: still waiting on incomplete message
0.477681 on 0: still waiting on incomplete message
0.477766 RECV on 0(out): 'Content-Length: 109
'
0.477770 : looking for messages on channels
0.477784 on 0: still waiting on incomplete message
0.477794 : SafeState: back to waiting, triggering SafeStateAgain
0.477803 on 0: still waiting on incomplete message
0.477813 on 0: still waiting on incomplete message
0.477857 RECV on 0(out): '{"jsonrpc":"2.0","id":5,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Fetching"}}'
0.477860 : looking for messages on channels
0.477873 on 0: still waiting on incomplete message
0.477883 : SafeState: back to waiting, triggering SafeStateAgain
0.477892 on 0: still waiting on incomplete message
0.477901 on 0: still waiting on incomplete message
0.477938 RECV on 0(out): 'Content-Length: 126
'
0.477941 : looking for messages on channels
0.477962 on 0: still waiting on incomplete message
0.477973 : SafeState: back to waiting, triggering SafeStateAgain
0.477982 on 0: still waiting on incomplete message
0.477991 on 0: still waiting on incomplete message
0.478024 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"begin","title":"Fetching"}}}'
0.478027 : looking for messages on channels
0.478038 on 0: still waiting on incomplete message
0.478048 : SafeState: back to waiting, triggering SafeStateAgain
0.478065 on 0: still waiting on incomplete message
0.478075 on 0: still waiting on incomplete message
0.482296 RECV on 0(out): 'Content-Length: 139
'
0.482305 : looking for messages on channels
0.482336 on 0: still waiting on incomplete message
0.482351 : SafeState: back to waiting, triggering SafeStateAgain
0.482362 on 0: still waiting on incomplete message
0.482373 on 0: still waiting on incomplete message
0.482428 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Loading","value":{"kind":"report","message":"metadata helloworld"}}}Content-Length: 139
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Loading","value":{"kind":"report","message":"metadata helloworld"}}}'
0.482434 : looking for messages on channels
0.482477 on 0: still waiting on incomplete message
0.482492 : SafeState: back to waiting, triggering SafeStateAgain
0.482503 on 0: still waiting on incomplete message
0.482513 on 0: still waiting on incomplete message
0.485785 RECV on 0(out): 'Content-Length: 104
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Loading","value":{"kind":"end"}}}Content-Length: 114
{"jsonrpc":"2.0","id":6,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Roots Scanned"}}Content-Length: 167
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"begin","title":"Roots Scanned","message":"0/2","percentage":0}}}Content-Length: 145
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"1/2","percentage":50}}}'
0.485794 : looking for messages on channels
0.485844 on 0: still waiting on incomplete message
0.485860 : SafeState: back to waiting, triggering SafeStateAgain
0.485871 on 0: still waiting on incomplete message
0.485881 on 0: still waiting on incomplete message
0.536211 SEND on 0(in): 'Content-Length: 198
Content-Type: application/vim-jsonrpc; charset=utf-8
{"method":"textDocument/documentHighlight","jsonrpc":"2.0","id":2,"params":{"textDocument":{"uri":"file:///home/prabirshrestha/code/tmp/helloworld/src/main.rs"},"position":{"character":3,"line":2}}}'
0.536501 on 0: still waiting on incomplete message
0.536552 RECV on 0(out): 'Content-Length: 126
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"end","message":"2/2"}}}Content-Length: 129
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"report","message":"metadata"}}}'
0.536556 : looking for messages on channels
0.536585 on 0: still waiting on incomplete message
0.536599 : SafeState: back to waiting, triggering SafeStateAgain
0.536612 on 0: still waiting on incomplete message
0.536622 on 0: still waiting on incomplete message
0.655437 on 0: timed out
0.655478 ERR on 0: Decoding failed - discarding input
0.673214 on 0: Incomplete message (23 bytes) - wait 100 msec for more
0.777412 RECV on 0(out): 'Content-Length: 105
'
0.777425 : looking for messages on channels
0.777472 on 0: timed out
0.777482 ERR on 0: Decoding failed - discarding input
0.777494 : SafeState: back to waiting, triggering SafeStateAgain
0.777505 on 0: Incomplete message (114 bytes) - wait 100 msec for more
0.777516 on 0: still waiting on incomplete message
0.777570 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"end"}}}'
0.777577 : looking for messages on channels
0.777622 on 0: still waiting on incomplete message
0.777638 : SafeState: back to waiting, triggering SafeStateAgain
0.777648 on 0: still waiting on incomplete message
0.777659 on 0: still waiting on incomplete message
0.791433 RECV on 0(out): 'Content-Length: 109
{"jsonrpc":"2.0","id":7,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Indexing"}}Content-Length: 141
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"begin","title":"Indexing","percentage":0}}}'
0.791445 : looking for messages on channels
0.791515 on 0: still waiting on incomplete message
0.791537 : SafeState: back to waiting, triggering SafeStateAgain
0.791551 on 0: still waiting on incomplete message
0.791564 on 0: still waiting on incomplete message
0.791695 RECV on 0(out): 'Content-Length: 146
'
0.791702 : looking for messages on channels
0.791726 on 0: still waiting on incomplete message
0.791751 : SafeState: back to waiting, triggering SafeStateAgain
0.791758 on 0: still waiting on incomplete message
0.791764 on 0: still waiting on incomplete message
0.791782 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","message":"0/5 (test)","percentage":0}}}Content-Length: 155
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","message":"0/5 (test + 1 more)","percentage":0}}}'
0.791784 : looking for messages on channels
0.791796 on 0: still waiting on incomplete message
0.791803 : SafeState: back to waiting, triggering SafeStateAgain
0.791808 on 0: still waiting on incomplete message
0.791813 on 0: still waiting on incomplete message
0.828500 RECV on 0(out): 'Content-Length: 112
'
0.828510 : looking for messages on channels
0.828547 on 0: still waiting on incomplete message
0.828563 : SafeState: back to waiting, triggering SafeStateAgain
0.828594 on 0: still waiting on incomplete message
0.828607 on 0: still waiting on incomplete message
0.828657 RECV on 0(out): '{"jsonrpc":"2.0","id":8,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/cargo check"}}'
0.828660 : looking for messages on channels
0.828675 on 0: still waiting on incomplete message
0.828687 : SafeState: back to waiting, triggering SafeStateAgain
0.828697 on 0: still waiting on incomplete message
0.828706 on 0: still waiting on incomplete message
0.828764 RECV on 0(out): 'Content-Length: 132
'
0.828768 : looking for messages on channels
0.828782 on 0: still waiting on incomplete message
0.828793 : SafeState: back to waiting, triggering SafeStateAgain
0.828802 on 0: still waiting on incomplete message
0.828811 on 0: still waiting on incomplete message
0.828846 RECV on 0(out): '{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/cargo check","value":{"kind":"begin","title":"cargo check"}}}'
0.828849 : looking for messages on channels
0.828873 on 0: still waiting on incomplete message
0.828884 : SafeState: back to waiting, triggering SafeStateAgain
0.828893 on 0: still waiting on incomplete message
0.828903 on 0: still waiting on incomplete message
0.844976 RECV on 0(out): 'Content-Length: 108
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/cargo check","value":{"kind":"end"}}}'
0.844985 : looking for messages on channels
0.845014 on 0: still waiting on incomplete message
0.845038 : SafeState: back to waiting, triggering SafeStateAgain
0.845045 on 0: still waiting on incomplete message
0.845051 on 0: still waiting on incomplete message
0.880935 RECV on 0(out): 'Content-Length: 147
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","message":"1/5 (core)","percentage":20}}}'
0.880944 : looking for messages on channels
0.880978 on 0: timed out
0.880984 ERR on 0: Decoding failed - discarding input
0.881008 : SafeState: back to waiting, triggering SafeStateAgain
0.881017 on 0: Incomplete message (23 bytes) - wait 100 msec for more
0.881023 on 0: still waiting on incomplete message
1.379709 : raw key input: "P1+r436F=323536\P1+r6B75=1B4F41\P1+r6B64=1B4F42\P1+r6B72=1B4F43\P1+r6B6C=1B4F44\P1+r2332=1B5B313B3248\P1+r2334=1B5B313B3244\P1+r2569=1B5B313B3243\P1+r2A37=1B5B313B3246\P1+r6B31=1B4F50\[?12;2$y"
1.379806 : raw terminal output: "P+q6b32\"
1.379841 : raw terminal output: "P+q6b33\"
1.379892 : raw terminal output: "P+q6b34\"
1.379977 : looking for messages on channels
1.379993 on 0: timed out
1.380002 ERR on 0: Decoding failed - discarding input
1.380015 : SafeState: back to waiting, triggering SafeStateAgain
1.380026 on 0: Incomplete message (167 bytes) - wait 100 msec for more
1.380062 : raw terminal output: " P+q6b35\"
1.380090 : raw terminal output: "P+q6b36\"
1.380120 : raw terminal output: "P+q6b37\"
1.380177 : looking for messages on channels
1.380189 on 0: still waiting on incomplete message
1.380200 : SafeState: back to waiting, triggering SafeStateAgain
1.380210 on 0: still waiting on incomplete message
1.380243 : raw terminal output: " P+q6b38\"
1.380273 : raw terminal output: "P+q6b39\"
1.380328 : looking for messages on channels
1.380341 on 0: still waiting on incomplete message
1.380351 : SafeState: back to waiting, triggering SafeStateAgain
1.380369 on 0: still waiting on incomplete message
1.380398 : raw terminal output: " P+q6b3b\"
1.380424 : raw terminal output: "P+q4631\"
1.380467 : looking for messages on channels
1.380481 on 0: still waiting on incomplete message
1.380493 : SafeState: back to waiting, triggering SafeStateAgain
1.380504 on 0: still waiting on incomplete message
1.380514 on 0: still waiting on incomplete message
1.680874 : looking for messages on channels
1.680917 on 0: timed out
1.680939 ERR on 0: Decoding failed - discarding input
1.680948 : SafeState: back to waiting, triggering SafeStateAgain
1.680956 : looking for messages on channels
1.680962 on 0: Incomplete message (23 bytes) - wait 100 msec for more
1.680969 : SafeState: back to waiting, triggering SafeStateAgain
1.680974 on 0: still waiting on incomplete message
1.680980 on 0: still waiting on incomplete message
4.324165 RECV on 0(out): 'Content-Length: 124
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","percentage":40}}}Content-Length: 148
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","message":"2/5 (alloc)","percentage":40}}}'
4.324176 : looking for messages on channels
4.324288 on 0: timed out
4.324304 ERR on 0: Decoding failed - discarding input
4.324317 : SafeState: back to waiting, triggering SafeStateAgain
4.324328 on 0: Incomplete message (145 bytes) - wait 100 msec for more
4.324351 on 0: still waiting on incomplete message
4.548713 RECV on 0(out): 'Content-Length: 146
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","message":"3/5 (std)","percentage":60}}}'
4.548734 : looking for messages on channels
4.548780 on 0: timed out
4.548791 ERR on 0: Decoding failed - discarding input
4.548803 : SafeState: back to waiting, triggering SafeStateAgain
4.548813 on 0: Incomplete message (23 bytes) - wait 100 msec for more
4.548843 on 0: still waiting on incomplete message
5.239436 RECV on 0(out): 'Content-Length: 153
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","message":"4/5 (proc_macro)","percentage":80}}}'
5.239446 : looking for messages on channels
5.239493 on 0: timed out
5.239508 ERR on 0: Decoding failed - discarding input
5.239523 : SafeState: back to waiting, triggering SafeStateAgain
5.239536 on 0: Incomplete message (109 bytes) - wait 100 msec for more
5.239572 on 0: still waiting on incomplete message
5.352935 RECV on 0(out): 'Content-Length: 38
{"jsonrpc":"2.0","id":2,"result":null}'
5.352946 : looking for messages on channels
5.352981 on 0: timed out
5.352987 ERR on 0: Decoding failed - discarding input
5.352996 : SafeState: back to waiting, triggering SafeStateAgain
5.353004 on 0: Incomplete message (23 bytes) - wait 100 msec for more
5.353011 on 0: still waiting on incomplete message
5.434346 RECV on 0(out): 'Content-Length: 125
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","percentage":100}}}Content-Length: 105
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"end"}}}'
5.434357 : looking for messages on channels
5.434432 on 0: still waiting on incomplete message
5.434450 : SafeState: back to waiting, triggering SafeStateAgain
5.434461 on 0: still waiting on incomplete message
5.434481 on 0: still waiting on incomplete message
7.702039 RECV on 0(out): 'Content-Length: 168
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/prabirshrestha/code/tmp/helloworld/src/main.rs","diagnostics":[],"version":1}}'
7.702047 : looking for messages on channels
7.702117 on 0: timed out
7.702125 ERR on 0: Decoding failed - discarding input
7.702135 : SafeState: back to waiting, triggering SafeStateAgain
7.702142 on 0: Incomplete message (126 bytes) - wait 100 msec for more
7.702169 on 0: still waiting on incomplete message
24.534098 : raw key input: "P0+r6B32\P0+r6B33\P0+r6B34\P0+r6B35\P0+r6B36\P0+r6B37\P0+r6B38\P0+r6B39\P0+r6B3B\P0+r4631\"
24.534257 : raw terminal output: "P+q4632\"
24.534339 : raw terminal output: "P+q2531\"
24.534451 : raw terminal output: "P+q2638\"
24.534533 : raw terminal output: "P+q6b62\"
24.534602 : raw terminal output: "P+q6b49\"
24.534675 : raw terminal output: "P+q6b44\"
24.534813 : looking for messages on channels
24.534849 on 0: timed out
24.534877 ERR on 0: Decoding failed - discarding input
24.534898 : SafeState: back to waiting, triggering SafeStateAgain
24.534918 on 0: Incomplete message (23 bytes) - wait 100 msec for more
24.534983 : raw terminal output: " P+q6b68\"
24.535051 : raw terminal output: "P+q4037\"
24.535117 : raw terminal output: "P+q6b50\"
24.535178 : raw terminal output: "P+q6b4e\"
24.535293 : looking for messages on channels
24.535356 on 0: still waiting on incomplete message
24.535379 : SafeState: back to waiting, triggering SafeStateAgain
24.535395 on 0: still waiting on incomplete message
24.535412 on 0: still waiting on incomplete message
24.835818 : looking for messages on channels
24.835896 on 0: timed out
24.835913 ERR on 0: Decoding failed - discarding input
24.835934 : SafeState: back to waiting, triggering SafeStateAgain
24.835951 : looking for messages on channels
24.835967 on 0: Incomplete message (108 bytes) - wait 100 msec for more
24.836021 : SafeState: back to waiting, triggering SafeStateAgain
24.836039 on 0: still waiting on incomplete message
24.836057 on 0: still waiting on incomplete message
25.254973 : raw key input: "P0+r4632\P0+r2531\P0+r2638\P1+r6B62=7F\P1+r6B49=1B5B327E\P1+r6B44=1B5B337E\P1+r6B68=1B4F48\P0+r4037\P1+r6B50=1B5B357E\P1+r6B4E=1B5B367E\a"
25.255053 : raw terminal output: "P+q4b31\"
25.255092 : raw terminal output: "P+q4b33\"
25.255122 : raw terminal output: "P+q4b34\"
25.255191 : raw terminal output: "P+q4b35\"
25.255256 : looking for messages on channels
25.255273 on 0: timed out
25.255282 ERR on 0: Decoding failed - discarding input
25.255293 : SafeState: back to waiting, triggering SafeStateAgain
25.255303 on 0: Incomplete message (23 bytes) - wait 100 msec for more
25.255337 : raw terminal output: " P+q6b42\"
25.255407 : looking for messages on channels
25.255422 on 0: still waiting on incomplete message
25.255444 : SafeState: back to waiting, triggering SafeStateAgain
25.255453 on 0: still waiting on incomplete message
25.255510 : SafeState: reset: key typed
25.292725 : SafeState: Start triggering
25.292938 : looking for messages on channels
25.292965 on 0: still waiting on incomplete message
25.292974 : SafeState: back to waiting, triggering SafeStateAgain
25.292980 on 0: still waiting on incomplete message
25.292986 on 0: still waiting on incomplete message
25.493367 on 0: timed out
25.493407 ERR on 0: Decoding failed - discarding input
25.594591 : looking for messages on channels
25.594671 on 0: Incomplete message (124 bytes) - wait 100 msec for more
25.594686 : SafeState: back to waiting, triggering SafeStateAgain
25.594696 : looking for messages on channels
25.594704 on 0: still waiting on incomplete message
25.594712 : SafeState: back to waiting, triggering SafeStateAgain
25.594720 on 0: still waiting on incomplete message
25.594728 on 0: still waiting on incomplete message
25.639354 on 0: still waiting on incomplete message
25.775940 : raw key input: "P0+r4B31\P0+r4B33\P0+r4B34\P0+r4B35\P1+r6B42=1B5B5A\l"
25.776171 : SafeState: reset: key typed
25.824396 SEND on 0(in): 'Content-Length: 281
Content-Type: application/vim-jsonrpc; charset=utf-8
{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"range":{"end":{"character":4,"line":2},"start":{"character":4,"line":2}},"text":"l","rangeLength":0}],"textDocument":{"uri":"file:///home/prabirshrestha/code/tmp/helloworld/src/main.rs","version":2}}}'
25.829412 SEND on 0(in): 'Content-Length: 191
Content-Type: application/vim-jsonrpc; charset=utf-8
{"method":"textDocument/completion","jsonrpc":"2.0","id":3,"params":{"textDocument":{"uri":"file:///home/prabirshrestha/code/tmp/helloworld/src/main.rs"},"position":{"character":5,"line":2}}}'
25.845942 : SafeState: Start triggering
25.846255 : looking for messages on channels
25.846275 on 0: timed out
25.846286 ERR on 0: Decoding failed - discarding input
25.846321 : SafeState: back to waiting, triggering SafeStateAgain
25.846333 on 0: Incomplete message (23 bytes) - wait 100 msec for more
25.846345 on 0: still waiting on incomplete message
25.876515 on 0: still waiting on incomplete message
25.888194 RECV on 0(out): 'Content-Length: 167569
{"jsonrpc":"2.0","id":3,"result":{"isIncomplete":true,"items":[{"label":"unsafe","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"unsafe","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"unsafe"},"additionalTextEdits":[]},{"label":"fn","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"fn","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"fn $1($2) {\n $0\n}"},"additionalTextEdits":[]},{"label":"const","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"const","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"const $0"},"additionalTextEdits":[]},{"label":"type","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"type","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"type $0"},"additionalTextEdits":[]},{"label":"impl","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"impl","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"impl $1 {\n $0\n}"},"additionalTextEdits":[]},{"label":"extern","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"extern","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"extern $0"},"additionalTextEdits":[]},{"label":"use","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"use","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"use $0"},"additionalTextEdits":[]},{"label":"trait","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"trait","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"trait $1 {\n $0\n}"},"additionalTextEdits":[]},{"label":"static","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"static","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"static $0"},"additionalTextEdits":[]},{"label":"mod","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"mod","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"mod $0"},"additionalTextEdits":[]},{"label":"match","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"match","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"match $1 {\n $0\n}"},"additionalTextEdits":[]},{"label":"while","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"while","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"while $1 {\n $0\n}"},"additionalTextEdits":[]},{"label":"while let","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"while let","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"while let $1 = $2 {\n $0\n}"},"additionalTextEdits":[]},{"label":"loop","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"loop","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"loop {\n $0\n}"},"additionalTextEdits":[]},{"label":"if","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"if","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"if $1 {\n $0\n}"},"additionalTextEdits":[]},{"l'
25.888218 RECV on 0(out): 'abel":"if let","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"if let","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"if let $1 = $2 {\n $0\n}"},"additionalTextEdits":[]},{"label":"for","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"for","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"for $1 in $2 {\n $0\n}"},"additionalTextEdits":[]},{"label":"true","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"true","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"true"},"additionalTextEdits":[]},{"label":"false","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"false","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"false"},"additionalTextEdits":[]},{"label":"let","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"let","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"let"},"additionalTextEdits":[]},{"label":"return","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"return","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"return;"},"additionalTextEdits":[]},{"label":"pd","kind":15,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"pd","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"eprintln!(\"$0 = {:?}\", $0);"},"additionalTextEdits":[]},{"label":"ppd","kind":15,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"ppd","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"eprintln!(\"$0 = {:#?}\", $0);"},"additionalTextEdits":[]},{"label":"self","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"self","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"self"},"additionalTextEdits":[]},{"label":"super","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"super","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"super"},"additionalTextEdits":[]},{"label":"crate","kind":14,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"crate","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"crate"},"additionalTextEdits":[]},{"label":"u32","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"u32","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"u32"},"additionalTextEdits":[]},{"label":"bool","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"bool","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"bool"},"additionalTextEdits":[]},{"label":"u8","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"u8","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"u8"},"additionalTextEdits":[]},{"label":"isize","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"isize","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"isize"},"additionalTextEdits":[]},{"label":"u16","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"u16","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"u16"},"additionalTextEdits":[]},{"label":"u64","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterTe'
25.888339 RECV on 0(out): 'xt":"u64","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"u64"},"additionalTextEdits":[]},{"label":"u128","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"u128","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"u128"},"additionalTextEdits":[]},{"label":"f32","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"f32","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"f32"},"additionalTextEdits":[]},{"label":"i128","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"i128","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"i128"},"additionalTextEdits":[]},{"label":"i16","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"i16","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"i16"},"additionalTextEdits":[]},{"label":"str","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"str","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"str"},"additionalTextEdits":[]},{"label":"i64","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"i64","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"i64"},"additionalTextEdits":[]},{"label":"char","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"char","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"char"},"additionalTextEdits":[]},{"label":"f64","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"f64","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"f64"},"additionalTextEdits":[]},{"label":"i32","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"i32","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"i32"},"additionalTextEdits":[]},{"label":"i8","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"i8","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"i8"},"additionalTextEdits":[]},{"label":"usize","kind":22,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"usize","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"usize"},"additionalTextEdits":[]},{"label":"main()","kind":3,"detail":"fn()","deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"main","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"main()$0"},"additionalTextEdits":[]},{"label":"eprint!(…)","kind":3,"detail":"macro_rules! eprint","documentation":{"kind":"markdown","value":"Prints to the standard error.\n\nEquivalent to the [`print!`] macro, except that output goes to\n[`io::stderr`] instead of [`io::stdout`]. See [`print!`] for\nexample usage.\n\nUse `eprint!` only for error and progress messages. Use `print!`\ninstead for the primary output of your program.\n\n[`io::stderr`]: crate::io::stderr\n[`io::stdout`]: crate::io::stdout\n\n# Panics\n\nPanics if writing to `io::stderr` fails.\n\n# Examples\n\n```rust\neprint!(\"Error: Could not complete task\");\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"eprint!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"eprint!($0)"},"additionalTextEdits":[]},{"label":"panic!(…)","kind":3,"detail":"macro_rules! panic","deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"panic!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"panic!($0)"},"additional'
25.888365 RECV on 0(out): 'TextEdits":[]},{"label":"debug_assert_eq!(…)","kind":3,"detail":"macro_rules! debug_assert_eq","documentation":{"kind":"markdown","value":"Asserts that two expressions are equal to each other.\n\nOn panic, this macro will print the values of the expressions with their\ndebug representations.\n\nUnlike [`assert_eq!`], `debug_assert_eq!` statements are only enabled in non\noptimized builds by default. An optimized build will not execute\n`debug_assert_eq!` statements unless `-C debug-assertions` is passed to the\ncompiler. This makes `debug_assert_eq!` useful for checks that are too\nexpensive to be present in a release build but may be helpful during\ndevelopment. The result of expanding `debug_assert_eq!` is always type checked.\n\n# Examples\n\n```rust\nlet a = 3;\nlet b = 1 + 2;\ndebug_assert_eq!(a, b);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"debug_assert_eq!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"debug_assert_eq!($0)"},"additionalTextEdits":[]},{"label":"stringify!(…)","kind":3,"detail":"macro_rules! stringify","documentation":{"kind":"markdown","value":"Stringifies its arguments.\n\nThis macro will yield an expression of type `&'static str` which is the\nstringification of all the tokens passed to the macro. No restrictions\nare placed on the syntax of the macro invocation itself.\n\nNote that the expanded results of the input tokens may change in the\nfuture. You should be careful if you rely on the output.\n\n# Examples\n\n```rust\nlet one_plus_one = stringify!(1 + 1);\nassert_eq!(one_plus_one, \"1 + 1\");\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"stringify!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"stringify!($0)"},"additionalTextEdits":[]},{"label":"concat!(…)","kind":3,"detail":"macro_rules! concat","documentation":{"kind":"markdown","value":"Concatenates literals into a static string slice.\n\nThis macro takes any number of comma-separated literals, yielding an\nexpression of type `&'static str` which represents all of the literals\nconcatenated left-to-right.\n\nInteger and floating point literals are stringified in order to be\nconcatenated.\n\n# Examples\n\n```rust\nlet s = concat!(\"test\", 10, 'b', true);\nassert_eq!(s, \"test10btrue\");\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"concat!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"concat!($0)"},"additionalTextEdits":[]},{"label":"format!(…)","kind":3,"detail":"macro_rules! format","documentation":{"kind":"markdown","value":"Creates a `String` using interpolation of runtime expressions.\n\nThe first argument `format!` receives is a format string. This must be a string\nliteral. The power of the formatting string is in the `{}`s contained.\n\nAdditional parameters passed to `format!` replace the `{}`s within the\nformatting string in the order given unless named or positional parameters\nare used; see [`std::fmt`] for more information.\n\nA common use for `format!` is concatenation and interpolation of strings.\nThe same convention is used with [`print!`] and [`write!`] macros,\ndepending on the intended destination of the string.\n\nTo convert a single value to a string, use the [`to_string`] method. This\nwill use the [`Display`] formatting trait.\n\n[`std::fmt`]: ../std/fmt/index.html\n[`print!`]: ../std/macro.print.html\n[`write!`]: core::write\n[`to_string`]: crate::string::ToString\n[`Display`]: core::fmt::Display\n\n# Panics\n\n`format!` panics if a formatting trait implementation returns an error.\nThis indicates an incorrect implementation\nsince `fmt::Write for String` never returns an error itself.\n\n# Examples\n\n```rust\nformat!(\"test\");\nformat!(\"hello {}\", \"world!\");\nformat!(\"x = {}, y = {y}\", 10, y = 30);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"form'
25.888429 RECV on 0(out): 'at!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"format!($0)"},"additionalTextEdits":[]},{"label":"log_syntax!(…)","kind":3,"detail":"macro_rules! log_syntax","documentation":{"kind":"markdown","value":"Prints passed tokens into the standard output."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"log_syntax!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"log_syntax!($0)"},"additionalTextEdits":[]},{"label":"include_str!(…)","kind":3,"detail":"macro_rules! include_str","documentation":{"kind":"markdown","value":"Includes a UTF-8 encoded file as a string.\n\nThe file is located relative to the current file (similarly to how\nmodules are found). The provided path is interpreted in a platform-specific\nway at compile time. So, for instance, an invocation with a Windows path\ncontaining backslashes `\\` would not compile correctly on Unix.\n\nThis macro will yield an expression of type `&'static str` which is the\ncontents of the file.\n\n# Examples\n\nAssume there are two files in the same directory with the following\ncontents:\n\nFile 'spanish.in':\n\n```text\nadiós\n```\n\nFile 'main.rs':\n\n```rust\nfn main() {\n let my_str = include_str!(\"spanish.in\");\n assert_eq!(my_str, \"adiós\\n\");\n print!(\"{}\", my_str);\n}\n```\n\nCompiling 'main.rs' and running the resulting binary will print \"adiós\"."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"include_str!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"include_str!($0)"},"additionalTextEdits":[]},{"label":"assert_ne!(…)","kind":3,"detail":"macro_rules! assert_ne","documentation":{"kind":"markdown","value":"Asserts that two expressions are not equal to each other (using [`PartialEq`]).\n\nOn panic, this macro will print the values of the expressions with their\ndebug representations.\n\nLike [`assert!`], this macro has a second form, where a custom\npanic message can be provided.\n\n# Examples\n\n```rust\nlet a = 3;\nlet b = 2;\nassert_ne!(a, b);\n\nassert_ne!(a, b, \"we are testing that the values are not equal\");\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"assert_ne!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"assert_ne!($0)"},"additionalTextEdits":[]},{"label":"dbg!(…)","kind":3,"detail":"macro_rules! dbg","documentation":{"kind":"markdown","value":"Prints and returns the value of a given expression for quick and dirty\ndebugging.\n\nAn example:\n\n```rust\nlet a = 2;\nlet b = dbg!(a * 2) + 1;\n// ^-- prints: [src/main.rs:2] a * 2 = 4\nassert_eq!(b, 5);\n```\n\nThe macro works by using the `Debug` implementation of the type of\nthe given expression to print the value to [stderr] along with the\nsource location of the macro invocation as well as the source code\nof the expression.\n\nInvoking the macro on an expression moves and takes ownership of it\nbefore returning the evaluated expression unchanged. If the type\nof the expression does not implement `Copy` and you don't want\nto give up ownership, you can instead borrow with `dbg!(&expr)`\nfor some expression `expr`.\n\nThe `dbg!` macro works exactly the same in release builds.\nThis is useful when debugging issues that only occur in release\nbuilds or when debugging in release mode is significantly faster.\n\nNote that the macro is intended as a debugging tool and therefore you\nshould avoid having uses of it in version control for long periods\n(other than in tests and similar).\nDebug output from production code is better done with other facilities\nsuch as the [`debug!`] macro from the [`log`] crate.\n\n# Stability\n\nThe exact output printed by this macro should not be relied upon\nand is subject to future changes.\n\n# Panics\n\nPanics if writing to `io::stderr` fails.\n\n# Further examples\n\nWith a method c'
25.888450 RECV on 0(out): 'all:\n\n```rust\nfn foo(n: usize) {\n if let Some(_) = dbg!(n.checked_sub(4)) {\n // ...\n }\n}\n\nfoo(3)\n```\n\nThis prints to [stderr]:\n\n```text,ignore\n[src/main.rs:4] n.checked_sub(4) = None\n```\n\nNaive factorial implementation:\n\n```rust\nfn factorial(n: u32) -> u32 {\n if dbg!(n <= 1) {\n dbg!(1)\n } else {\n dbg!(n * factorial(n - 1))\n }\n}\n\ndbg!(factorial(4));\n```\n\nThis prints to [stderr]:\n\n```text,ignore\n[src/main.rs:3] n <= 1 = false\n[src/main.rs:3] n <= 1 = false\n[src/main.rs:3] n <= 1 = false\n[src/main.rs:3] n <= 1 = true\n[src/main.rs:4] 1 = 1\n[src/main.rs:5] n * factorial(n - 1) = 2\n[src/main.rs:5] n * factorial(n - 1) = 6\n[src/main.rs:5] n * factorial(n - 1) = 24\n[src/main.rs:11] factorial(4) = 24\n```\n\nThe `dbg!(..)` macro moves the input:\n\n```rust\n/// A wrapper around `usize` which importantly is not Copyable.\n#[derive(Debug)]\nstruct NoCopy(usize);\n\nlet a = NoCopy(42);\nlet _ = dbg!(a); // <-- `a` is moved here.\nlet _ = dbg!(a); // <-- `a` is moved again; error!\n```\n\nYou can also use `dbg!()` without a value to just print the\nfile and line whenever it's reached.\n\nFinally, if you want to `dbg!(..)` multiple values, it will treat them as\na tuple (and return it, too):\n\n```rust\nassert_eq!(dbg!(1usize, 2u32), (1, 2));\n```\n\nHowever, a single argument with a trailing comma will still not be treated\nas a tuple, following the convention of ignoring trailing commas in macro\ninvocations. You can use a 1-tuple directly if you need one:\n\n```rust\nassert_eq!(1, dbg!(1u32,)); // trailing comma ignored\nassert_eq!((1,), dbg!((1u32,))); // 1-tuple\n```\n\n[stderr]: https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)\n[`debug!`]: https://docs.rs/log/*/log/macro.debug.html\n[`log`]: https://crates.io/crates/log"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"dbg!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"dbg!($0)"},"additionalTextEdits":[]},{"label":"vec![…]","kind":3,"detail":"macro_rules! vec","documentation":{"kind":"markdown","value":"Creates a [`Vec`] containing the arguments.\n\n`vec!` allows `Vec`s to be defined with the same syntax as array expressions.\nThere are two forms of this macro:\n\n- Create a [`Vec`] containing a given list of elements:\n\n```rust\nlet v = vec![1, 2, 3];\nassert_eq!(v[0], 1);\nassert_eq!(v[1], 2);\nassert_eq!(v[2], 3);\n```\n\n- Create a [`Vec`] from a given element and size:\n\n```rust\nlet v = vec![1; 3];\nassert_eq!(v, [1, 1, 1]);\n```\n\nNote that unlike array expressions this syntax supports all elements\nwhich implement [`Clone`] and the number of elements doesn't have to be\na constant.\n\nThis will use `clone` to duplicate an expression, so one should be careful\nusing this with types having a nonstandard `Clone` implementation. For\nexample, `vec![Rc::new(1); 5]` will create a vector of five references\nto the same boxed integer value, not five references pointing to independently\nboxed integers.\n\nAlso, note that `vec![expr; 0]` is allowed, and produces an empty vector.\nThis will still evaluate `expr`, however, and immediately drop the resulting value, so\nbe mindful of side effects.\n\n[`Vec`]: crate::vec::Vec"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"vec!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"vec![$0]"},"additionalTextEdits":[]},{"label":"include!(…)","kind":3,"detail":"macro_rules! include","documentation":{"kind":"markdown","value":"Parses a file as an expression or an item according to the context.\n\nThe file is located relative to the current file (similarly to how\nmodules are found). The provided path is interpreted in a platform-specific\nway at compile time. So, for instance, an invocation with a Windows path\ncontaining backslashes `\\` would not compile correctly on Unix.\n\nUsing this macro is often a bad idea, because if the file is\nparsed as'
25.888530 RECV on 0(out): ' an expression, it is going to be placed in the\nsurrounding code unhygienically. This could result in variables\nor functions being different from what the file expected if\nthere are variables or functions that have the same name in\nthe current file.\n\n# Examples\n\nAssume there are two files in the same directory with the following\ncontents:\n\nFile 'monkeys.in':\n\n```rust\n['🙈', '🙊', '🙉']\n .iter()\n .cycle()\n .take(6)\n .collect::<String>()\n```\n\nFile 'main.rs':\n\n```rust\nfn main() {\n let my_string = include!(\"monkeys.in\");\n assert_eq!(\"🙈🙊🙉🙈🙊🙉\", my_string);\n println!(\"{}\", my_string);\n}\n```\n\nCompiling 'main.rs' and running the resulting binary will print\n\"🙈🙊🙉🙈🙊🙉\"."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"include!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"include!($0)"},"additionalTextEdits":[]},{"label":"print!(…)","kind":3,"detail":"macro_rules! print","documentation":{"kind":"markdown","value":"Prints to the standard output.\n\nEquivalent to the [`println!`] macro except that a newline is not printed at\nthe end of the message.\n\nNote that stdout is frequently line-buffered by default so it may be\nnecessary to use [`io::stdout().flush()`][flush] to ensure the output is emitted\nimmediately.\n\nUse `print!` only for the primary output of your program. Use\n[`eprint!`] instead to print error and progress messages.\n\n[flush]: crate::io::Write::flush\n\n# Panics\n\nPanics if writing to `io::stdout()` fails.\n\n# Examples\n\n```rust\nuse std::io::{self, Write};\n\nprint!(\"this \");\nprint!(\"will \");\nprint!(\"be \");\nprint!(\"on \");\nprint!(\"the \");\nprint!(\"same \");\nprint!(\"line \");\n\nio::stdout().flush().unwrap();\n\nprint!(\"this string has a newline, why not choose println! instead?\\n\");\n\nio::stdout().flush().unwrap();\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"print!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"print!($0)"},"additionalTextEdits":[]},{"label":"concat_idents!(…)","kind":3,"detail":"macro_rules! concat_idents","documentation":{"kind":"markdown","value":"Concatenates identifiers into one identifier.\n\nThis macro takes any number of comma-separated identifiers, and\nconcatenates them all into one, yielding an expression which is a new\nidentifier. Note that hygiene makes it such that this macro cannot\ncapture local variables. Also, as a general rule, macros are only\nallowed in item, statement or expression position. That means while\nyou may use this macro for referring to existing variables, functions or\nmodules etc, you cannot define a new one with it.\n\n# Examples\n\n```rust\n#![feature(concat_idents)]\n\nfn foobar() -> u32 { 23 }\n\nlet f = concat_idents!(foo, bar);\nprintln!(\"{}\", f());\n\n// fn concat_idents!(new, fun, name) { } // not usable in this way!\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"concat_idents!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"concat_idents!($0)"},"additionalTextEdits":[]},{"label":"write!(…)","kind":3,"detail":"macro_rules! write","documentation":{"kind":"markdown","value":"Writes formatted data into a buffer.\n\nThis macro accepts a 'writer', a format string, and a list of arguments. Arguments will be\nformatted according to the specified format string and the result will be passed to the writer.\nThe writer may be any value with a `write_fmt` method; generally this comes from an\nimplementation of either the [`fmt::Write`] or the [`io::Write`] trait. The macro\nreturns whatever the `write_fmt` method returns; commonly a [`fmt::Result`], or an\n[`io::Result`].\n\nSee [`std::fmt`] for more information on the format string syntax.\n\n[`std::fmt`]: ../std/fmt/index.html\n[`fmt::Write`]: crate::fmt::Write\n[`io::Write`]: ..'
25.888543 RECV on 0(out): '/std/io/trait.Write.html\n[`fmt::Result`]: crate::fmt::Result\n[`io::Result`]: ../std/io/type.Result.html\n\n# Examples\n\n```rust\nuse std::io::Write;\n\nfn main() -> std::io::Result<()> {\n let mut w = Vec::new();\n write!(&mut w, \"test\")?;\n write!(&mut w, \"formatted {}\", \"arguments\")?;\n\n assert_eq!(w, b\"testformatted arguments\");\n Ok(())\n}\n```\n\nA module can import both `std::fmt::Write` and `std::io::Write` and call `write!` on objects\nimplementing either, as objects do not typically implement both. However, the module must\nimport the traits qualified so their names do not conflict:\n\n```rust\nuse std::fmt::Write as FmtWrite;\nuse std::io::Write as IoWrite;\n\nfn main() -> Result<(), Box<dyn std::error::Error>> {\n let mut s = String::new();\n let mut v = Vec::new();\n\n write!(&mut s, \"{} {}\", \"abc\", 123)?; // uses fmt::Write::write_fmt\n write!(&mut v, \"s = {:?}\", s)?; // uses io::Write::write_fmt\n assert_eq!(v, b\"s = \\\"abc 123\\\"\");\n Ok(())\n}\n```\n\nNote: This macro can be used in `no_std` setups as well.\nIn a `no_std` setup you are responsible for the implementation details of the components.\n\n```rust\nuse core::fmt::Write;\n\nstruct Example;\n\nimpl Write for Example {\n fn write_str(&mut self, _s: &str) -> core::fmt::Result {\n unimplemented!();\n }\n}\n\nlet mut m = Example{};\nwrite!(&mut m, \"Hello World\").expect(\"Not written\");\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"write!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"write!($0)"},"additionalTextEdits":[]},{"label":"line!(…)","kind":3,"detail":"macro_rules! line","documentation":{"kind":"markdown","value":"Expands to the line number on which it was invoked.\n\nWith [`column!`] and [`file!`], these macros provide debugging information for\ndevelopers about the location within the source.\n\nThe expanded expression has type `u32` and is 1-based, so the first line\nin each file evaluates to 1, the second to 2, etc. This is consistent\nwith error messages by common compilers or popular editors.\nThe returned line is *not necessarily* the line of the `line!` invocation itself,\nbut rather the first macro invocation leading up to the invocation\nof the `line!` macro.\n\n# Examples\n\n```rust\nlet current_line = line!();\nprintln!(\"defined on line: {}\", current_line);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"line!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"line!($0)"},"additionalTextEdits":[]},{"label":"env!(…)","kind":3,"detail":"macro_rules! env","documentation":{"kind":"markdown","value":"Inspects an environment variable at compile time.\n\nThis macro will expand to the value of the named environment variable at\ncompile time, yielding an expression of type `&'static str`.\n\nIf the environment variable is not defined, then a compilation error\nwill be emitted. To not emit a compile error, use the [`option_env!`]\nmacro instead.\n\n# Examples\n\n```rust\nlet path: &'static str = env!(\"PATH\");\nprintln!(\"the $PATH variable at the time of compiling was: {}\", path);\n```\n\nYou can customize the error message by passing a string as the second\nparameter:\n\n```rust\nlet doc: &'static str = env!(\"documentation\", \"what's that?!\");\n```\n\nIf the `documentation` environment variable is not defined, you'll get\nthe following error:\n\n```text\nerror: what's that?!\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"env!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"env!($0)"},"additionalTextEdits":[]},{"label":"debug_assert!(…)","kind":3,"detail":"macro_rules! debug_assert","documentation":{"kind":"markdown","value":"Asserts that a boolean expression is `true` at runtime.\n\nThis will invoke the [`panic!`] macro if the provided expression cannot b'
25.888597 RECV on 0(out): 'e\nevaluated to `true` at runtime.\n\nLike [`assert!`], this macro also has a second version, where a custom panic\nmessage can be provided.\n\n# Uses\n\nUnlike [`assert!`], `debug_assert!` statements are only enabled in non\noptimized builds by default. An optimized build will not execute\n`debug_assert!` statements unless `-C debug-assertions` is passed to the\ncompiler. This makes `debug_assert!` useful for checks that are too\nexpensive to be present in a release build but may be helpful during\ndevelopment. The result of expanding `debug_assert!` is always type checked.\n\nAn unchecked assertion allows a program in an inconsistent state to keep\nrunning, which might have unexpected consequences but does not introduce\nunsafety as long as this only happens in safe code. The performance cost\nof assertions, however, is not measurable in general. Replacing [`assert!`]\nwith `debug_assert!` is thus only encouraged after thorough profiling, and\nmore importantly, only in safe code!\n\n# Examples\n\n```rust\n// the panic message for these assertions is the stringified value of the\n// expression given.\ndebug_assert!(true);\n\nfn some_expensive_computation() -> bool { true } // a very simple function\ndebug_assert!(some_expensive_computation());\n\n// assert with a custom message\nlet x = true;\ndebug_assert!(x, \"x wasn't true!\");\n\nlet a = 3; let b = 27;\ndebug_assert!(a + b == 30, \"a = {}, b = {}\", a, b);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"debug_assert!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"debug_assert!($0)"},"additionalTextEdits":[]},{"label":"const_format_args!(…)","kind":3,"detail":"macro_rules! const_format_args","documentation":{"kind":"markdown","value":"Same as [`format_args`], but can be used in some const contexts.\n\nThis macro is used by the panic macros for the `const_panic` feature.\n\nThis macro will be removed once `format_args` is allowed in const contexts."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"const_format_args!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"const_format_args!($0)"},"additionalTextEdits":[]},{"label":"include_bytes!(…)","kind":3,"detail":"macro_rules! include_bytes","documentation":{"kind":"markdown","value":"Includes a file as a reference to a byte array.\n\nThe file is located relative to the current file (similarly to how\nmodules are found). The provided path is interpreted in a platform-specific\nway at compile time. So, for instance, an invocation with a Windows path\ncontaining backslashes `\\` would not compile correctly on Unix.\n\nThis macro will yield an expression of type `&'static [u8; N]` which is\nthe contents of the file.\n\n# Examples\n\nAssume there are two files in the same directory with the following\ncontents:\n\nFile 'spanish.in':\n\n```text\nadiós\n```\n\nFile 'main.rs':\n\n```rust\nfn main() {\n let bytes = include_bytes!(\"spanish.in\");\n assert_eq!(bytes, b\"adi\\xc3\\xb3s\\n\");\n print!(\"{}\", String::from_utf8_lossy(bytes));\n}\n```\n\nCompiling 'main.rs' and running the resulting binary will print \"adiós\"."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"include_bytes!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"include_bytes!($0)"},"additionalTextEdits":[]},{"label":"thread_local! {…}","kind":3,"detail":"macro_rules! thread_local","documentation":{"kind":"markdown","value":"Declare a new thread local storage key of type [`std::thread::LocalKey`].\n\n# Syntax\n\nThe macro wraps any number of static declarations and makes them thread local.\nPublicity and attributes for each static are allowed. Example:\n\n```rust\nuse std::cell::RefCell;\nthread_local! {\n pub static FOO: RefCell<u32> = RefCell::new(1);\n\n #[allow(unused)]\n static BAR: RefCell<f32> = RefCell::new(1.0);\n}\n```\n\nSee [`LocalK'
25.888607 RECV on 0(out): 'ey` documentation][`std::thread::LocalKey`] for more\ninformation.\n\n[`std::thread::LocalKey`]: crate::thread::LocalKey"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"thread_local!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"thread_local! {$0}"},"additionalTextEdits":[]},{"label":"file!(…)","kind":3,"detail":"macro_rules! file","documentation":{"kind":"markdown","value":"Expands to the file name in which it was invoked.\n\nWith [`line!`] and [`column!`], these macros provide debugging information for\ndevelopers about the location within the source.\n\nThe expanded expression has type `&'static str`, and the returned file\nis not the invocation of the `file!` macro itself, but rather the\nfirst macro invocation leading up to the invocation of the `file!`\nmacro.\n\n# Examples\n\n```rust\nlet this_file = file!();\nprintln!(\"defined in file: {}\", this_file);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"file!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"file!($0)"},"additionalTextEdits":[]},{"label":"try!(…)","kind":3,"detail":"macro_rules! try","documentation":{"kind":"markdown","value":"Unwraps a result or propagates its error.\n\nThe `?` operator was added to replace `try!` and should be used instead.\nFurthermore, `try` is a reserved word in Rust 2018, so if you must use\nit, you will need to use the [raw-identifier syntax][ris]: `r#try`.\n\n[ris]: https://doc.rust-lang.org/nightly/rust-by-example/compatibility/raw_identifiers.html\n\n`try!` matches the given [`Result`]. In case of the `Ok` variant, the\nexpression has the value of the wrapped value.\n\nIn case of the `Err` variant, it retrieves the inner error. `try!` then\nperforms conversion using `From`. This provides automatic conversion\nbetween specialized errors and more general ones. The resulting\nerror is then immediately returned.\n\nBecause of the early return, `try!` can only be used in functions that\nreturn [`Result`].\n\n# Examples\n\n```rust\nuse std::io;\nuse std::fs::File;\nuse std::io::prelude::*;\n\nenum MyError {\n FileWriteError\n}\n\nimpl From<io::Error> for MyError {\n fn from(e: io::Error) -> MyError {\n MyError::FileWriteError\n }\n}\n\n// The preferred method of quick returning Errors\nfn write_to_file_question() -> Result<(), MyError> {\n let mut file = File::create(\"my_best_friends.txt\")?;\n file.write_all(b\"This is a list of my best friends.\")?;\n Ok(())\n}\n\n// The previous method of quick returning Errors\nfn write_to_file_using_try() -> Result<(), MyError> {\n let mut file = r#try!(File::create(\"my_best_friends.txt\"));\n r#try!(file.write_all(b\"This is a list of my best friends.\"));\n Ok(())\n}\n\n// This is equivalent to:\nfn write_to_file_using_match() -> Result<(), MyError> {\n let mut file = r#try!(File::create(\"my_best_friends.txt\"));\n match file.write_all(b\"This is a list of my best friends.\") {\n Ok(v) => v,\n Err(e) => return Err(From::from(e)),\n }\n Ok(())\n}\n```"},"deprecated":true,"preselect":true,"sortText":"fffffff1","filterText":"try!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"try!($0)"},"additionalTextEdits":[],"tags":[1]},{"label":"assert!(…)","kind":3,"detail":"macro_rules! assert","documentation":{"kind":"markdown","value":"Asserts that a boolean expression is `true` at runtime.\n\nThis will invoke the [`panic!`] macro if the provided expression cannot be\nevaluated to `true` at runtime.\n\n# Uses\n\nAssertions are always checked in both debug and release builds, and cannot\nbe disabled. See [`debug_assert!`] for assertions that are not enabled in\nrelease builds by default.\n\nUnsafe code may rely on `assert!` to enforce run-time invariants that, if\nviolated could lead to unsafety.\n\nOther use-cases of `assert!` include testing and enforcing run-time\'
25.888651 RECV on 0(out): 'ninvariants in safe code (whose violation cannot result in unsafety).\n\n# Custom Messages\n\nThis macro has a second form, where a custom panic message can\nbe provided with or without arguments for formatting. See [`std::fmt`]\nfor syntax for this form. Expressions used as format arguments will only\nbe evaluated if the assertion fails.\n\n[`std::fmt`]: ../std/fmt/index.html\n\n# Examples\n\n```rust\n// the panic message for these assertions is the stringified value of the\n// expression given.\nassert!(true);\n\nfn some_computation() -> bool { true } // a very simple function\n\nassert!(some_computation());\n\n// assert with a custom message\nlet x = true;\nassert!(x, \"x wasn't true!\");\n\nlet a = 3; let b = 27;\nassert!(a + b == 30, \"a = {}, b = {}\", a, b);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"assert!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"assert!($0)"},"additionalTextEdits":[]},{"label":"column!(…)","kind":3,"detail":"macro_rules! column","documentation":{"kind":"markdown","value":"Expands to the column number at which it was invoked.\n\nWith [`line!`] and [`file!`], these macros provide debugging information for\ndevelopers about the location within the source.\n\nThe expanded expression has type `u32` and is 1-based, so the first column\nin each line evaluates to 1, the second to 2, etc. This is consistent\nwith error messages by common compilers or popular editors.\nThe returned column is *not necessarily* the line of the `column!` invocation itself,\nbut rather the first macro invocation leading up to the invocation\nof the `column!` macro.\n\n# Examples\n\n```rust\nlet current_col = column!();\nprintln!(\"defined on column: {}\", current_col);\n```\n\n`column!` counts Unicode code points, not bytes or graphemes. As a result, the first two\ninvocations return the same value, but the third does not.\n\n```rust\nlet a = (\"foobar\", column!()).1;\nlet b = (\"人之初性本善\", column!()).1;\nlet c = (\"f̅o̅o̅b̅a̅r̅\", column!()).1; // Uses combining overline (U+0305)\n\nassert_eq!(a, b);\nassert_ne!(b, c);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"column!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"column!($0)"},"additionalTextEdits":[]},{"label":"format_args_nl!(…)","kind":3,"detail":"macro_rules! format_args_nl","documentation":{"kind":"markdown","value":"Same as [`format_args`], but adds a newline in the end."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"format_args_nl!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"format_args_nl!($0)"},"additionalTextEdits":[]},{"label":"unreachable!(…)","kind":3,"detail":"macro_rules! unreachable","documentation":{"kind":"markdown","value":"Indicates unreachable code.\n\nThis is useful any time that the compiler can't determine that some code is unreachable. For\nexample:\n\n* Match arms with guard conditions.\n* Loops that dynamically terminate.\n* Iterators that dynamically terminate.\n\nIf the determination that the code is unreachable proves incorrect, the\nprogram immediately terminates with a [`panic!`].\n\nThe unsafe counterpart of this macro is the [`unreachable_unchecked`] function, which\nwill cause undefined behavior if the code is reached.\n\n[`unreachable_unchecked`]: crate::hint::unreachable_unchecked\n\n# Panics\n\nThis will always [`panic!`] because `unreachable!` is just a shorthand for `panic!` with a\nfixed, specific message.\n\nLike `panic!`, this macro has a second form for displaying custom values.\n\n# Examples\n\nMatch arms:\n\n```rust\nfn foo(x: Option<i32>) {\n match x {\n Some(n) if n >= 0 => println!(\"Some(Non-negative)\"),\n Some(n) if n < 0 => println!(\"Some(Negative)\"),\n Some(_) => unreachable!(), // compile error if commented out\n None =>'
25.888662 RECV on 0(out): ' println!(\"None\")\n }\n}\n```\n\nIterators:\n\n```rust\nfn divide_by_three(x: u32) -> u32 { // one of the poorest implementations of x/3\n for i in 0.. {\n if 3*i < i { panic!(\"u32 overflow\"); }\n if x < 3*i { return i-1; }\n }\n unreachable!(\"The loop should always return\");\n}\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"unreachable!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"unreachable!($0)"},"additionalTextEdits":[]},{"label":"eprintln!(…)","kind":3,"detail":"macro_rules! eprintln","documentation":{"kind":"markdown","value":"Prints to the standard error, with a newline.\n\nEquivalent to the [`println!`] macro, except that output goes to\n[`io::stderr`] instead of [`io::stdout`]. See [`println!`] for\nexample usage.\n\nUse `eprintln!` only for error and progress messages. Use `println!`\ninstead for the primary output of your program.\n\n[`io::stderr`]: crate::io::stderr\n[`io::stdout`]: crate::io::stdout\n\n# Panics\n\nPanics if writing to `io::stderr` fails.\n\n# Examples\n\n```rust\neprintln!(\"Error: Could not complete task\");\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"eprintln!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"eprintln!($0)"},"additionalTextEdits":[]},{"label":"unimplemented!(…)","kind":3,"detail":"macro_rules! unimplemented","documentation":{"kind":"markdown","value":"Indicates unimplemented code by panicking with a message of \"not implemented\".\n\nThis allows your code to type-check, which is useful if you are prototyping or\nimplementing a trait that requires multiple methods which you don't plan to use all of.\n\nThe difference between `unimplemented!` and [`todo!`] is that while `todo!`\nconveys an intent of implementing the functionality later and the message is \"not yet\nimplemented\", `unimplemented!` makes no such claims. Its message is \"not implemented\".\nAlso some IDEs will mark `todo!`s.\n\n# Panics\n\nThis will always [`panic!`] because `unimplemented!` is just a shorthand for `panic!` with a\nfixed, specific message.\n\nLike `panic!`, this macro has a second form for displaying custom values.\n\n# Examples\n\nSay we have a trait `Foo`:\n\n```rust\ntrait Foo {\n fn bar(&self) -> u8;\n fn baz(&self);\n fn qux(&self) -> Result<u64, ()>;\n}\n```\n\nWe want to implement `Foo` for 'MyStruct', but for some reason it only makes sense\nto implement the `bar()` function. `baz()` and `qux()` will still need to be defined\nin our implementation of `Foo`, but we can use `unimplemented!` in their definitions\nto allow our code to compile.\n\nWe still want to have our program stop running if the unimplemented methods are\nreached.\n\n```rust\nstruct MyStruct;\n\nimpl Foo for MyStruct {\n fn bar(&self) -> u8 {\n 1 + 1\n }\n\n fn baz(&self) {\n // It makes no sense to `baz` a `MyStruct`, so we have no logic here\n // at all.\n // This will display \"thread 'main' panicked at 'not implemented'\".\n unimplemented!();\n }\n\n fn qux(&self) -> Result<u64, ()> {\n // We have some logic here,\n // We can add a message to unimplemented! to display our omission.\n // This will display:\n // \"thread 'main' panicked at 'not implemented: MyStruct isn't quxable'\".\n unimplemented!(\"MyStruct isn't quxable\");\n }\n}\n\nfn main() {\n let s = MyStruct;\n s.bar();\n}\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"unimplemented!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"unimplemented!($0)"},"additionalTextEdits":[]},{"label":"cfg!(…)","kind":3,"detail":"macro_rules! cfg","documentation":{"kind":"markdown","value":"Evaluates boolean combinations of configuration flags at compile-time.\n\nIn addition to the `#[cfg]` attribute, this macro is provided to'
25.888709 RECV on 0(out): ' allow\nboolean expression evaluation of configuration flags. This frequently\nleads to less duplicated code.\n\nThe syntax given to this macro is the same syntax as the [`cfg`]\nattribute.\n\n`cfg!`, unlike `#[cfg]`, does not remove any code and only evaluates to true or false. For\nexample, all blocks in an if/else expression need to be valid when `cfg!` is used for\nthe condition, regardless of what `cfg!` is evaluating.\n\n[`cfg`]: ../reference/conditional-compilation.html#the-cfg-attribute\n\n# Examples\n\n```rust\nlet my_directory = if cfg!(windows) {\n \"windows-specific-directory\"\n} else {\n \"unix-directory\"\n};\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"cfg!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"cfg!($0)"},"additionalTextEdits":[]},{"label":"todo!(…)","kind":3,"detail":"macro_rules! todo","documentation":{"kind":"markdown","value":"Indicates unfinished code.\n\nThis can be useful if you are prototyping and are just looking to have your\ncode typecheck.\n\nThe difference between [`unimplemented!`] and `todo!` is that while `todo!` conveys\nan intent of implementing the functionality later and the message is \"not yet\nimplemented\", `unimplemented!` makes no such claims. Its message is \"not implemented\".\nAlso some IDEs will mark `todo!`s.\n\n# Panics\n\nThis will always [`panic!`].\n\n# Examples\n\nHere's an example of some in-progress code. We have a trait `Foo`:\n\n```rust\ntrait Foo {\n fn bar(&self);\n fn baz(&self);\n}\n```\n\nWe want to implement `Foo` on one of our types, but we also want to work on\njust `bar()` first. In order for our code to compile, we need to implement\n`baz()`, so we can use `todo!`:\n\n```rust\nstruct MyStruct;\n\nimpl Foo for MyStruct {\n fn bar(&self) {\n // implementation goes here\n }\n\n fn baz(&self) {\n // let's not worry about implementing baz() for now\n todo!();\n }\n}\n\nfn main() {\n let s = MyStruct;\n s.bar();\n\n // we aren't even using baz(), so this is fine.\n}\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"todo!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"todo!($0)"},"additionalTextEdits":[]},{"label":"trace_macros!(…)","kind":3,"detail":"macro_rules! trace_macros","documentation":{"kind":"markdown","value":"Enables or disables tracing functionality used for debugging other macros."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"trace_macros!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"trace_macros!($0)"},"additionalTextEdits":[]},{"label":"module_path!(…)","kind":3,"detail":"macro_rules! module_path","documentation":{"kind":"markdown","value":"Expands to a string that represents the current module path.\n\nThe current module path can be thought of as the hierarchy of modules\nleading back up to the crate root. The first component of the path\nreturned is the name of the crate currently being compiled.\n\n# Examples\n\n```rust\nmod test {\n pub fn foo() {\n assert!(module_path!().ends_with(\"test\"));\n }\n}\n\ntest::foo();\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"module_path!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"module_path!($0)"},"additionalTextEdits":[]},{"label":"writeln!(…)","kind":3,"detail":"macro_rules! writeln","documentation":{"kind":"markdown","value":"Write formatted data into a buffer, with a newline appended.\n\nOn all platforms, the newline is the LINE FEED character (`\\n`/`U+000A`) alone\n(no additional CARRIAGE RETURN (`\\r`/`U+000D`).\n\nFor more information, see [`write!`]. For information on the format string syntax, see\n[`std::fmt`].\n\n[`std::fmt`]: ../std/fmt/index.html\n\n# Examples\n\n```rust\nuse std::io::{Write, Result}'
25.888719 RECV on 0(out): ';\n\nfn main() -> Result<()> {\n let mut w = Vec::new();\n writeln!(&mut w)?;\n writeln!(&mut w, \"test\")?;\n writeln!(&mut w, \"formatted {}\", \"arguments\")?;\n\n assert_eq!(&w[..], \"\\ntest\\nformatted arguments\\n\".as_bytes());\n Ok(())\n}\n```\n\nA module can import both `std::fmt::Write` and `std::io::Write` and call `write!` on objects\nimplementing either, as objects do not typically implement both. However, the module must\nimport the traits qualified so their names do not conflict:\n\n```rust\nuse std::fmt::Write as FmtWrite;\nuse std::io::Write as IoWrite;\n\nfn main() -> Result<(), Box<dyn std::error::Error>> {\n let mut s = String::new();\n let mut v = Vec::new();\n\n writeln!(&mut s, \"{} {}\", \"abc\", 123)?; // uses fmt::Write::write_fmt\n writeln!(&mut v, \"s = {:?}\", s)?; // uses io::Write::write_fmt\n assert_eq!(v, b\"s = \\\"abc 123\\\\n\\\"\\n\");\n Ok(())\n}\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"writeln!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"writeln!($0)"},"additionalTextEdits":[]},{"label":"option_env!(…)","kind":3,"detail":"macro_rules! option_env","documentation":{"kind":"markdown","value":"Optionally inspects an environment variable at compile time.\n\nIf the named environment variable is present at compile time, this will\nexpand into an expression of type `Option<&'static str>` whose value is\n`Some` of the value of the environment variable. If the environment\nvariable is not present, then this will expand to `None`. See\n[`Option<T>`][Option] for more information on this type.\n\nA compile time error is never emitted when using this macro regardless\nof whether the environment variable is present or not.\n\n# Examples\n\n```rust\nlet key: Option<&'static str> = option_env!(\"SECRET_KEY\");\nprintln!(\"the secret key might be: {:?}\", key);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"option_env!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"option_env!($0)"},"additionalTextEdits":[]},{"label":"compile_error!(…)","kind":3,"detail":"macro_rules! compile_error","documentation":{"kind":"markdown","value":"Causes compilation to fail with the given error message when encountered.\n\nThis macro should be used when a crate uses a conditional compilation strategy to provide\nbetter error messages for erroneous conditions. It's the compiler-level form of [`panic!`],\nbut emits an error during *compilation* rather than at *runtime*.\n\n# Examples\n\nTwo such examples are macros and `#[cfg]` environments.\n\nEmit better compiler error if a macro is passed invalid values. Without the final branch,\nthe compiler would still emit an error, but the error's message would not mention the two\nvalid values.\n\n```rust\nmacro_rules! give_me_foo_or_bar {\n (foo) => {};\n (bar) => {};\n ($x:ident) => {\n compile_error!(\"This macro only accepts `foo` or `bar`\");\n }\n}\n\ngive_me_foo_or_bar!(neither);\n// ^ will fail at compile time with message \"This macro only accepts `foo` or `bar`\"\n```\n\nEmit compiler error if one of a number of features isn't available.\n\n```rust\n#[cfg(not(any(feature = \"foo\", feature = \"bar\")))]\ncompile_error!(\"Either feature \\\"foo\\\" or \\\"bar\\\" must be enabled for this crate.\");\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"compile_error!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"compile_error!($0)"},"additionalTextEdits":[]},{"label":"matches!(…)","kind":3,"detail":"macro_rules! matches","documentation":{"kind":"markdown","value":"Returns whether the given expression matches any of the given patterns.\n\nLike in a `match` expression, the pattern can be optionally followed by `if`\nand a guard expression that has access to names bound by the pattern.\n\n# Examples\n\n```r'
25.888771 RECV on 0(out): 'ust\nlet foo = 'f';\nassert!(matches!(foo, 'A'..='Z' | 'a'..='z'));\n\nlet bar = Some(4);\nassert!(matches!(bar, Some(x) if x > 2));\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"matches!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"matches!($0)"},"additionalTextEdits":[]},{"label":"println!(…)","kind":3,"detail":"macro_rules! println","documentation":{"kind":"markdown","value":"Prints to the standard output, with a newline.\n\nOn all platforms, the newline is the LINE FEED character (`\\n`/`U+000A`) alone\n(no additional CARRIAGE RETURN (`\\r`/`U+000D`)).\n\nUse the [`format!`] syntax to write data to the standard output.\nSee [`std::fmt`] for more information.\n\nUse `println!` only for the primary output of your program. Use\n[`eprintln!`] instead to print error and progress messages.\n\n[`std::fmt`]: crate::fmt\n\n# Panics\n\nPanics if writing to [`io::stdout`] fails.\n\n[`io::stdout`]: crate::io::stdout\n\n# Examples\n\n```rust\nprintln!(); // prints just a newline\nprintln!(\"hello there!\");\nprintln!(\"format {} arguments\", \"some\");\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"println!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"println!($0)"},"additionalTextEdits":[]},{"label":"concat_bytes!(…)","kind":3,"detail":"macro_rules! concat_bytes","documentation":{"kind":"markdown","value":"Concatenates literals into a byte slice.\n\nThis macro takes any number of comma-separated literals, and concatenates them all into\none, yielding an expression of type `&[u8, _]`, which represents all of the literals\nconcatenated left-to-right. The literals passed can be any combination of:\n\n- byte literals (`b'r'`)\n- byte strings (`b\"Rust\"`)\n- arrays of bytes/numbers (`[b'A', 66, b'C']`)\n\n# Examples\n\n```rust\n#![feature(concat_bytes)]\n\nlet s: &[u8; 6] = concat_bytes!(b'A', b\"BC\", [68, b'E', 70]);\nassert_eq!(s, b\"ABCDEF\");\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"concat_bytes!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"concat_bytes!($0)"},"additionalTextEdits":[]},{"label":"assert_eq!(…)","kind":3,"detail":"macro_rules! assert_eq","documentation":{"kind":"markdown","value":"Asserts that two expressions are equal to each other (using [`PartialEq`]).\n\nOn panic, this macro will print the values of the expressions with their\ndebug representations.\n\nLike [`assert!`], this macro has a second form, where a custom\npanic message can be provided.\n\n# Examples\n\n```rust\nlet a = 3;\nlet b = 1 + 2;\nassert_eq!(a, b);\n\nassert_eq!(a, b, \"we are testing addition with {} and {}\", a, b);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"assert_eq!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"assert_eq!($0)"},"additionalTextEdits":[]},{"label":"is_x86_feature_detected!(…)","kind":3,"detail":"macro_rules! is_x86_feature_detected","documentation":{"kind":"markdown","value":"A macro to test at *runtime* whether a CPU feature is available on\nx86/x86-64 platforms.\n\nThis macro is provided in the standard library and will detect at runtime\nwhether the specified CPU feature is detected. This does **not** resolve at\ncompile time unless the specified feature is already enabled for the entire\ncrate. Runtime detection currently relies mostly on the `cpuid` instruction.\n\nThis macro only takes one argument which is a string literal of the feature\nbeing tested for. The feature names supported are the lowercase versions of\nthe ones defined by Intel in [their documentation][docs].\n\n## Supported arguments\n\nThis macro supports the same names that `#[target_feature]` supports. Unlike\n`#[target_feature]`, however, this macro does not support names separated\nwith a comma. Instead testing fo'
25.888781 RECV on 0(out): 'r multiple features must be done through\nseparate macro invocations for now.\n\nSupported arguments are:\n\n* `\"aes\"`\n* `\"pclmulqdq\"`\n* `\"rdrand\"`\n* `\"rdseed\"`\n* `\"tsc\"`\n* `\"mmx\"`\n* `\"sse\"`\n* `\"sse2\"`\n* `\"sse3\"`\n* `\"ssse3\"`\n* `\"sse4.1\"`\n* `\"sse4.2\"`\n* `\"sse4a\"`\n* `\"sha\"`\n* `\"avx\"`\n* `\"avx2\"`\n* `\"avx512f\"`\n* `\"avx512cd\"`\n* `\"avx512er\"`\n* `\"avx512pf\"`\n* `\"avx512bw\"`\n* `\"avx512dq\"`\n* `\"avx512vl\"`\n* `\"avx512ifma\"`\n* `\"avx512vbmi\"`\n* `\"avx512vpopcntdq\"`\n* `\"avx512vbmi2\"`\n* `\"avx512gfni\"`\n* `\"avx512vaes\"`\n* `\"avx512vpclmulqdq\"`\n* `\"avx512vnni\"`\n* `\"avx512bitalg\"`\n* `\"avx512bf16\"`\n* `\"avx512vp2intersect\"`\n* `\"f16c\"`\n* `\"fma\"`\n* `\"bmi1\"`\n* `\"bmi2\"`\n* `\"abm\"`\n* `\"lzcnt\"`\n* `\"tbm\"`\n* `\"popcnt\"`\n* `\"fxsr\"`\n* `\"xsave\"`\n* `\"xsaveopt\"`\n* `\"xsaves\"`\n* `\"xsavec\"`\n* `\"cmpxchg16b\"`\n* `\"adx\"`\n* `\"rtm\"`\n\n[docs]: https://software.intel.com/sites/landingpage/IntrinsicsGuide"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"is_x86_feature_detected!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"is_x86_feature_detected!($0)"},"additionalTextEdits":[]},{"label":"format_args!(…)","kind":3,"detail":"macro_rules! format_args","documentation":{"kind":"markdown","value":"Constructs parameters for the other string-formatting macros.\n\nThis macro functions by taking a formatting string literal containing\n`{}` for each additional argument passed. `format_args!` prepares the\nadditional parameters to ensure the output can be interpreted as a string\nand canonicalizes the arguments into a single type. Any value that implements\nthe [`Display`] trait can be passed to `format_args!`, as can any\n[`Debug`] implementation be passed to a `{:?}` within the formatting string.\n\nThis macro produces a value of type [`fmt::Arguments`]. This value can be\npassed to the macros within [`std::fmt`] for performing useful redirection.\nAll other formatting macros ([`format!`], [`write!`], [`println!`], etc) are\nproxied through this one. `format_args!`, unlike its derived macros, avoids\nheap allocations.\n\nYou can use the [`fmt::Arguments`] value that `format_args!` returns\nin `Debug` and `Display` contexts as seen below. The example also shows\nthat `Debug` and `Display` format to the same thing: the interpolated\nformat string in `format_args!`.\n\n```rust\nlet debug = format!(\"{:?}\", format_args!(\"{} foo {:?}\", 1, 2));\nlet display = format!(\"{}\", format_args!(\"{} foo {:?}\", 1, 2));\nassert_eq!(\"1 foo 2\", display);\nassert_eq!(display, debug);\n```\n\nFor more information, see the documentation in [`std::fmt`].\n\n[`Display`]: crate::fmt::Display\n[`Debug`]: crate::fmt::Debug\n[`fmt::Arguments`]: crate::fmt::Arguments\n[`std::fmt`]: ../std/fmt/index.html\n[`format!`]: ../std/macro.format.html\n[`println!`]: ../std/macro.println.html\n\n# Examples\n\n```rust\nuse std::fmt;\n\nlet s = fmt::format(format_args!(\"hello {}\", \"world\"));\nassert_eq!(s, format!(\"hello {}\", \"world\"));\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"format_args!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"format_args!($0)"},"additionalTextEdits":[]},{"label":"debug_assert_ne!(…)","kind":3,"detail":"macro_rules! debug_assert_ne","documentation":{"kind":"markdown","value":"Asserts that two expressions are not equal to each other.\n\nOn panic, this macro will print the values of the expressions with their\ndebug representations.\n\nUnlike [`assert_ne!`], `debug_assert_ne!` statements are only enabled in non\noptimized builds by default. An optimized build will not execute\n`debug_assert_ne!` statements unless `-C debug-assertions` is passed to the\ncompiler. This makes `debug_assert_ne!` useful for checks that are too\nexpensive to be present in a release build but may be helpful during\ndevelopment. The result of expanding'
25.888832 RECV on 0(out): ' `debug_assert_ne!` is always type checked.\n\n# Examples\n\n```rust\nlet a = 3;\nlet b = 2;\ndebug_assert_ne!(a, b);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"debug_assert_ne!","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"debug_assert_ne!($0)"},"additionalTextEdits":[]},{"label":"alloc","kind":9,"documentation":{"kind":"markdown","value":"# The Rust core allocation and collections library\n\nThis library provides smart pointers and collections for managing\nheap-allocated values.\n\nThis library, like libcore, normally doesn’t need to be used directly\nsince its contents are re-exported in the [`std` crate](../std/index.html).\nCrates that use the `#![no_std]` attribute however will typically\nnot depend on `std`, so they’d use this crate instead.\n\n## Boxed values\n\nThe [`Box`] type is a smart pointer type. There can only be one owner of a\n[`Box`], and the owner can decide to mutate the contents, which live on the\nheap.\n\nThis type can be sent among threads efficiently as the size of a `Box` value\nis the same as that of a pointer. Tree-like data structures are often built\nwith boxes because each node often has only one owner, the parent.\n\n## Reference counted pointers\n\nThe [`Rc`] type is a non-threadsafe reference-counted pointer type intended\nfor sharing memory within a thread. An [`Rc`] pointer wraps a type, `T`, and\nonly allows access to `&T`, a shared reference.\n\nThis type is useful when inherited mutability (such as using [`Box`]) is too\nconstraining for an application, and is often paired with the [`Cell`] or\n[`RefCell`] types in order to allow mutation.\n\n## Atomically reference counted pointers\n\nThe [`Arc`] type is the threadsafe equivalent of the [`Rc`] type. It\nprovides all the same functionality of [`Rc`], except it requires that the\ncontained type `T` is shareable. Additionally, [`Arc<T>`][`Arc`] is itself\nsendable while [`Rc<T>`][`Rc`] is not.\n\nThis type allows for shared access to the contained data, and is often\npaired with synchronization primitives such as mutexes to allow mutation of\nshared resources.\n\n## Collections\n\nImplementations of the most common general purpose data structures are\ndefined in this library. They are re-exported through the\n[standard collections library](../std/collections/index.html).\n\n## Heap interfaces\n\nThe [`alloc`](alloc/index.html) module defines the low-level interface to the\ndefault global allocator. It is not compatible with the libc allocator API.\n\n[`Arc`]: sync\n[`Box`]: boxed\n[`Cell`]: core::cell\n[`Rc`]: rc\n[`RefCell`]: core::cell"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"alloc","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"alloc"},"additionalTextEdits":[]},{"label":"std","kind":9,"documentation":{"kind":"markdown","value":"# The Rust Standard Library\n\nThe Rust Standard Library is the foundation of portable Rust software, a\nset of minimal and battle-tested shared abstractions for the [broader Rust\necosystem][crates.io]. It offers core types, like [`Vec<T>`] and\n[`Option<T>`], library-defined [operations on language\nprimitives](#primitives), [standard macros](#macros), [I/O] and\n[multithreading], among [many other things][other].\n\n`std` is available to all Rust crates by default. Therefore, the\nstandard library can be accessed in [`use`] statements through the path\n`std`, as in [`use std::env`].\n\n# How to read this documentation\n\nIf you already know the name of what you are looking for, the fastest way to\nfind it is to use the <a href=\"#\" onclick=\"focusSearchBar();\">search\nbar</a> at the top of the page.\n\nOtherwise, you may want to jump to one of these useful sections:\n\n* [`std::*` modules](#modules)\n* [Primitive types](#primitives)\n* [Standard macros](#macros)\n* [The Rust Prelude]\n\nIf this is your first time, the documentation for the standard library is\nwritten to be casually perused. Clicking on inter'
25.888841 RECV on 0(out): 'esting things should\ngenerally lead you to interesting places. Still, there are important bits\nyou don't want to miss, so read on for a tour of the standard library and\nits documentation!\n\nOnce you are familiar with the contents of the standard library you may\nbegin to find the verbosity of the prose distracting. At this stage in your\ndevelopment you may want to press the `[-]` button near the top of the\npage to collapse it into a more skimmable view.\n\nWhile you are looking at that `[-]` button also notice the `source`\nlink. Rust's API documentation comes with the source code and you are\nencouraged to read it. The standard library source is generally high\nquality and a peek behind the curtains is often enlightening.\n\n# What is in the standard library documentation?\n\nFirst of all, The Rust Standard Library is divided into a number of focused\nmodules, [all listed further down this page](#modules). These modules are\nthe bedrock upon which all of Rust is forged, and they have mighty names\nlike [`std::slice`] and [`std::cmp`]. Modules' documentation typically\nincludes an overview of the module along with examples, and are a smart\nplace to start familiarizing yourself with the library.\n\nSecond, implicit methods on [primitive types] are documented here. This can\nbe a source of confusion for two reasons:\n\n1. While primitives are implemented by the compiler, the standard library\n implements methods directly on the primitive types (and it is the only\n library that does so), which are [documented in the section on\n primitives](#primitives).\n2. The standard library exports many modules *with the same name as\n primitive types*. These define additional items related to the primitive\n type, but not the all-important methods.\n\nSo for example there is a [page for the primitive type\n`i32`](primitive::i32) that lists all the methods that can be called on\n32-bit integers (very useful), and there is a [page for the module\n`std::i32`] that documents the constant values [`MIN`] and [`MAX`] (rarely\nuseful).\n\nNote the documentation for the primitives [`str`] and [`[T]`][prim@slice] (also\ncalled 'slice'). Many method calls on [`String`] and [`Vec<T>`] are actually\ncalls to methods on [`str`] and [`[T]`][prim@slice] respectively, via [deref\ncoercions][deref-coercions].\n\nThird, the standard library defines [The Rust Prelude], a small collection\nof items - mostly traits - that are imported into every module of every\ncrate. The traits in the prelude are pervasive, making the prelude\ndocumentation a good entry point to learning about the library.\n\nAnd finally, the standard library exports a number of standard macros, and\n[lists them on this page](#macros) (technically, not all of the standard\nmacros are defined by the standard library - some are defined by the\ncompiler - but they are documented here the same). Like the prelude, the\nstandard macros are imported by default into all crates.\n\n# Contributing changes to the documentation\n\nCheck out the rust contribution guidelines [here](\nhttps://rustc-dev-guide.rust-lang.org/contributing.html#writing-documentation).\nThe source for this documentation can be found on\n[GitHub](https://github.com/rust-lang/rust).\nTo contribute changes, make sure you read the guidelines first, then submit\npull-requests for your suggested changes.\n\nContributions are appreciated! If you see a part of the docs that can be\nimproved, submit a PR, or chat with us first on [Discord][rust-discord]\n#docs.\n\n# A Tour of The Rust Standard Library\n\nThe rest of this crate documentation is dedicated to pointing out notable\nfeatures of The Rust Standard Library.\n\n## Containers and collections\n\nThe [`option`] and [`result`] modules define optional and error-handling\ntypes, [`Option<T>`] and [`Result<T, E>`]. The [`iter`] module defines\nRust's iterator trait, [`Iterator`], which works with the [`for`] loop to\naccess collections.\n\nThe standard library exposes three common ways to deal with contiguous\nregions of memory:\n\n* [`Vec<T>`] - A heap-allocated *'
25.888897 RECV on 0(out): 'vector* that is resizable at runtime.\n* [`[T; N]`][prim@array] - An inline *array* with a fixed size at compile time.\n* [`[T]`][prim@slice] - A dynamically sized *slice* into any other kind of contiguous\n storage, whether heap-allocated or not.\n\nSlices can only be handled through some kind of *pointer*, and as such come\nin many flavors such as:\n\n* `&[T]` - *shared slice*\n* `&mut [T]` - *mutable slice*\n* [`Box<[T]>`][owned slice] - *owned slice*\n\n[`str`], a UTF-8 string slice, is a primitive type, and the standard library\ndefines many methods for it. Rust [`str`]s are typically accessed as\nimmutable references: `&str`. Use the owned [`String`] for building and\nmutating strings.\n\nFor converting to strings use the [`format!`] macro, and for converting from\nstrings use the [`FromStr`] trait.\n\nData may be shared by placing it in a reference-counted box or the [`Rc`]\ntype, and if further contained in a [`Cell`] or [`RefCell`], may be mutated\nas well as shared. Likewise, in a concurrent setting it is common to pair an\natomically-reference-counted box, [`Arc`], with a [`Mutex`] to get the same\neffect.\n\nThe [`collections`] module defines maps, sets, linked lists and other\ntypical collection types, including the common [`HashMap<K, V>`].\n\n## Platform abstractions and I/O\n\nBesides basic data types, the standard library is largely concerned with\nabstracting over differences in common platforms, most notably Windows and\nUnix derivatives.\n\nCommon types of I/O, including [files], [TCP], [UDP], are defined in the\n[`io`], [`fs`], and [`net`] modules.\n\nThe [`thread`] module contains Rust's threading abstractions. [`sync`]\ncontains further primitive shared memory types, including [`atomic`] and\n[`mpsc`], which contains the channel types for message passing.\n\n[I/O]: io\n[`MIN`]: i32::MIN\n[`MAX`]: i32::MAX\n[page for the module `std::i32`]: crate::i32\n[TCP]: net::TcpStream\n[The Rust Prelude]: prelude\n[UDP]: net::UdpSocket\n[`Arc`]: sync::Arc\n[owned slice]: boxed\n[`Cell`]: cell::Cell\n[`FromStr`]: str::FromStr\n[`HashMap<K, V>`]: collections::HashMap\n[`Mutex`]: sync::Mutex\n[`Option<T>`]: option::Option\n[`Rc`]: rc::Rc\n[`RefCell`]: cell::RefCell\n[`Result<T, E>`]: result::Result\n[`Vec<T>`]: vec::Vec\n[`atomic`]: sync::atomic\n[`for`]: ../book/ch03-05-control-flow.html#looping-through-a-collection-with-for\n[`str`]: prim@str\n[`mpsc`]: sync::mpsc\n[`std::cmp`]: cmp\n[`std::slice`]: mod@slice\n[`use std::env`]: env/index.html\n[`use`]: ../book/ch07-02-defining-modules-to-control-scope-and-privacy.html\n[crates.io]: https://crates.io\n[deref-coercions]: ../book/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods\n[files]: fs::File\n[multithreading]: thread\n[other]: #what-is-in-the-standard-library-documentation\n[primitive types]: ../book/ch03-02-data-types.html\n[rust-discord]: https://discord.gg/rust-lang\n[array]: prim@array\n[slice]: prim@slice"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"std","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"std"},"additionalTextEdits":[]},{"label":"core","kind":9,"documentation":{"kind":"markdown","value":"# The Rust Core Library\n\nThe Rust Core Library is the dependency-free[^free] foundation of [The\nRust Standard Library](../std/index.html). It is the portable glue\nbetween the language and its libraries, defining the intrinsic and\nprimitive building blocks of all Rust code. It links to no\nupstream libraries, no system libraries, and no libc.\n\n[^free]: Strictly speaking, there are some symbols which are needed but\n they aren't always necessary.\n\nThe core library is *minimal*: it isn't even aware of heap allocation,\nnor does it provide concurrency or I/O. These things require\nplatform integration, and this library is platform-agnostic.\n\n# How to use the core library\n\nPlease note that all of these details are currently not considered stable.\n\nThis library is built on the assumption of a few existing symbols:\n\n* `memcpy`, `memcmp`, `me'
25.888907 RECV on 0(out): 'mset` - These are core memory routines which are\n often generated by LLVM. Additionally, this library can make explicit\n calls to these functions. Their signatures are the same as found in C.\n These functions are often provided by the system libc, but can also be\n provided by the [compiler-builtins crate](https://crates.io/crates/compiler_builtins).\n\n* `rust_begin_panic` - This function takes four arguments, a\n `fmt::Arguments`, a `&'static str`, and two `u32`'s. These four arguments\n dictate the panic message, the file at which panic was invoked, and the\n line and column inside the file. It is up to consumers of this core\n library to define this panic function; it is only required to never\n return. This requires a `lang` attribute named `panic_impl`.\n\n* `rust_eh_personality` - is used by the failure mechanisms of the\n compiler. This is often mapped to GCC's personality function, but crates\n which do not trigger a panic can be assured that this function is never\n called. The `lang` attribute is called `eh_personality`."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"core","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"core"},"additionalTextEdits":[]},{"label":"AsMut","kind":8,"documentation":{"kind":"markdown","value":"Used to do a cheap mutable-to-mutable reference conversion.\n\nThis trait is similar to [`AsRef`] but used for converting between mutable\nreferences. If you need to do a costly conversion it is better to\nimplement [`From`] with type `&mut T` or write a custom function.\n\n**Note: This trait must not fail**. If the conversion can fail, use a\ndedicated method which returns an [`Option<T>`] or a [`Result<T, E>`].\n\n# Generic Implementations\n\n- `AsMut` auto-dereferences if the inner type is a mutable reference\n (e.g.: `foo.as_mut()` will work the same if `foo` has type `&mut Foo`\n or `&mut &mut Foo`)\n\n# Examples\n\nUsing `AsMut` as trait bound for a generic function we can accept all mutable references\nthat can be converted to type `&mut T`. Because [`Box<T>`] implements `AsMut<T>` we can\nwrite a function `add_one` that takes all arguments that can be converted to `&mut u64`.\nBecause [`Box<T>`] implements `AsMut<T>`, `add_one` accepts arguments of type\n`&mut Box<u64>` as well:\n\n```rust\nfn add_one<T: AsMut<u64>>(num: &mut T) {\n *num.as_mut() += 1;\n}\n\nlet mut boxed_num = Box::new(0);\nadd_one(&mut boxed_num);\nassert_eq!(*boxed_num, 1);\n```\n\n[`Box<T>`]: ../../std/boxed/struct.Box.html"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"AsMut","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"AsMut"},"additionalTextEdits":[]},{"label":"RustcDecodable","kind":18,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"RustcDecodable","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"RustcDecodable"},"additionalTextEdits":[]},{"label":"From","kind":8,"documentation":{"kind":"markdown","value":"Used to do value-to-value conversions while consuming the input value. It is the reciprocal of\n[`Into`].\n\nOne should always prefer implementing `From` over [`Into`]\nbecause implementing `From` automatically provides one with an implementation of [`Into`]\nthanks to the blanket implementation in the standard library.\n\nOnly implement [`Into`] when targeting a version prior to Rust 1.41 and converting to a type\noutside the current crate.\n`From` was not able to do these types of conversions in earlier versions because of Rust's\norphaning rules.\nSee [`Into`] for more details.\n\nPrefer using [`Into`] over using `From` when specifying trait bounds on a generic function.\nThis way, types that directly implement [`Into`] can be used as arguments as well.\n\nThe `From` is also very useful when performing error handling. When constructing a function\nthat is capable of failing, the return type will generally be of the form `Result<T, E>`.\nThe `From` trait simplif'
25.888971 RECV on 0(out): 'ies error handling by allowing a function to return a single error type\nthat encapsulate multiple error types. See the \"Examples\" section and [the book][book] for more\ndetails.\n\n**Note: This trait must not fail**. If the conversion can fail, use [`TryFrom`].\n\n# Generic Implementations\n\n- `From<T> for U` implies [`Into`]`<U> for T`\n- `From` is reflexive, which means that `From<T> for T` is implemented\n\n# Examples\n\n[`String`] implements `From<&str>`:\n\nAn explicit conversion from a `&str` to a String is done as follows:\n\n```rust\nlet string = \"hello\".to_string();\nlet other_string = String::from(\"hello\");\n\nassert_eq!(string, other_string);\n```\n\nWhile performing error handling it is often useful to implement `From` for your own error type.\nBy converting underlying error types to our own custom error type that encapsulates the\nunderlying error type, we can return a single error type without losing information on the\nunderlying cause. The '?' operator automatically converts the underlying error type to our\ncustom error type by calling `Into<CliError>::into` which is automatically provided when\nimplementing `From`. The compiler then infers which implementation of `Into` should be used.\n\n```rust\nuse std::fs;\nuse std::io;\nuse std::num;\n\nenum CliError {\n IoError(io::Error),\n ParseError(num::ParseIntError),\n}\n\nimpl From<io::Error> for CliError {\n fn from(error: io::Error) -> Self {\n CliError::IoError(error)\n }\n}\n\nimpl From<num::ParseIntError> for CliError {\n fn from(error: num::ParseIntError) -> Self {\n CliError::ParseError(error)\n }\n}\n\nfn open_and_parse_file(file_name: &str) -> Result<i32, CliError> {\n let mut contents = fs::read_to_string(&file_name)?;\n let num: i32 = contents.trim().parse()?;\n Ok(num)\n}\n```\n\n[`String`]: ../../std/string/struct.String.html\n[`from`]: From::from\n[book]: ../../book/ch09-00-error-handling.html"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"From","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"From"},"additionalTextEdits":[]},{"label":"Unpin","kind":8,"documentation":{"kind":"markdown","value":"Types that can be safely moved after being pinned.\n\nRust itself has no notion of immovable types, and considers moves (e.g.,\nthrough assignment or [`mem::replace`]) to always be safe.\n\nThe [`Pin`][Pin] type is used instead to prevent moves through the type\nsystem. Pointers `P<T>` wrapped in the [`Pin<P<T>>`][Pin] wrapper can't be\nmoved out of. See the [`pin` module] documentation for more information on\npinning.\n\nImplementing the `Unpin` trait for `T` lifts the restrictions of pinning off\nthe type, which then allows moving `T` out of [`Pin<P<T>>`][Pin] with\nfunctions such as [`mem::replace`].\n\n`Unpin` has no consequence at all for non-pinned data. In particular,\n[`mem::replace`] happily moves `!Unpin` data (it works for any `&mut T`, not\njust when `T: Unpin`). However, you cannot use [`mem::replace`] on data\nwrapped inside a [`Pin<P<T>>`][Pin] because you cannot get the `&mut T` you\nneed for that, and *that* is what makes this system work.\n\nSo this, for example, can only be done on types implementing `Unpin`:\n\n```rust\nuse std::mem;\nuse std::pin::Pin;\n\nlet mut string = \"this\".to_string();\nlet mut pinned_string = Pin::new(&mut string);\n\n// We need a mutable reference to call `mem::replace`.\n// We can obtain such a reference by (implicitly) invoking `Pin::deref_mut`,\n// but that is only possible because `String` implements `Unpin`.\nmem::replace(&mut *pinned_string, \"other\".to_string());\n```\n\nThis trait is automatically implemented for almost every type.\n\n[`mem::replace`]: crate::mem::replace\n[Pin]: crate::pin::Pin\n[`pin` module]: crate::pin"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Unpin","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Unpin"},"additionalTextEdits":[]},{"label":"FnMut","kind":8,"documentation":{"'
25.888981 RECV on 0(out): 'kind":"markdown","value":"The version of the call operator that takes a mutable receiver.\n\nInstances of `FnMut` can be called repeatedly and may mutate state.\n\n`FnMut` is implemented automatically by closures which take mutable\nreferences to captured variables, as well as all types that implement\n[`Fn`], e.g., (safe) [function pointers] (since `FnMut` is a supertrait of\n[`Fn`]). Additionally, for any type `F` that implements `FnMut`, `&mut F`\nimplements `FnMut`, too.\n\nSince [`FnOnce`] is a supertrait of `FnMut`, any instance of `FnMut` can be\nused where a [`FnOnce`] is expected, and since [`Fn`] is a subtrait of\n`FnMut`, any instance of [`Fn`] can be used where `FnMut` is expected.\n\nUse `FnMut` as a bound when you want to accept a parameter of function-like\ntype and need to call it repeatedly, while allowing it to mutate state.\nIf you don't want the parameter to mutate state, use [`Fn`] as a\nbound; if you don't need to call it repeatedly, use [`FnOnce`].\n\nSee the [chapter on closures in *The Rust Programming Language*][book] for\nsome more information on this topic.\n\nAlso of note is the special syntax for `Fn` traits (e.g.\n`Fn(usize, bool) -> usize`). Those interested in the technical details of\nthis can refer to [the relevant section in the *Rustonomicon*][nomicon].\n\n[book]: ../../book/ch13-01-closures.html\n[function pointers]: fn\n[nomicon]: ../../nomicon/hrtb.html\n\n# Examples\n\n## Calling a mutably capturing closure\n\n```rust\nlet mut x = 5;\n{\n let mut square_x = || x *= x;\n square_x();\n}\nassert_eq!(x, 25);\n```\n\n## Using a `FnMut` parameter\n\n```rust\nfn do_twice<F>(mut func: F)\n where F: FnMut()\n{\n func();\n func();\n}\n\nlet mut x: usize = 1;\n{\n let add_two_to_x = || x += 2;\n do_twice(add_two_to_x);\n}\n\nassert_eq!(x, 5);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"FnMut","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"FnMut"},"additionalTextEdits":[]},{"label":"Extend","kind":8,"documentation":{"kind":"markdown","value":"Extend a collection with the contents of an iterator.\n\nIterators produce a series of values, and collections can also be thought\nof as a series of values. The `Extend` trait bridges this gap, allowing you\nto extend a collection by including the contents of that iterator. When\nextending a collection with an already existing key, that entry is updated\nor, in the case of collections that permit multiple entries with equal\nkeys, that entry is inserted.\n\n# Examples\n\nBasic usage:\n\n```rust\n// You can extend a String with some chars:\nlet mut message = String::from(\"The first three letters are: \");\n\nmessage.extend(&['a', 'b', 'c']);\n\nassert_eq!(\"abc\", &message[29..32]);\n```\n\nImplementing `Extend`:\n\n```rust\n// A sample collection, that's just a wrapper over Vec<T>\n#[derive(Debug)]\nstruct MyCollection(Vec<i32>);\n\n// Let's give it some methods so we can create one and add things\n// to it.\nimpl MyCollection {\n fn new() -> MyCollection {\n MyCollection(Vec::new())\n }\n\n fn add(&mut self, elem: i32) {\n self.0.push(elem);\n }\n}\n\n// since MyCollection has a list of i32s, we implement Extend for i32\nimpl Extend<i32> for MyCollection {\n\n // This is a bit simpler with the concrete type signature: we can call\n // extend on anything which can be turned into an Iterator which gives\n // us i32s. Because we need i32s to put into MyCollection.\n fn extend<T: IntoIterator<Item=i32>>(&mut self, iter: T) {\n\n // The implementation is very straightforward: loop through the\n // iterator, and add() each element to ourselves.\n for elem in iter {\n self.add(elem);\n }\n }\n}\n\nlet mut c = MyCollection::new();\n\nc.add(5);\nc.add(6);\nc.add(7);\n\n// let's extend our collection with three more numbers\nc.extend(vec![1, 2, 3]);\n\n// we've added these elements onto the end\nassert_eq!(\"MyCollection([5, 6, 7, 1, 2, 3])\", format!(\"{:?}\", c));\n```"},"depr'
25.889043 RECV on 0(out): 'ecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Extend","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Extend"},"additionalTextEdits":[]},{"label":"PartialEq","kind":8,"documentation":{"kind":"markdown","value":"Trait for equality comparisons which are [partial equivalence\nrelations](https://en.wikipedia.org/wiki/Partial_equivalence_relation).\n\n`x.eq(y)` can also be written `x == y`, and `x.ne(y)` can be written `x != y`.\nWe use the easier-to-read infix notation in the remainder of this documentation.\n\nThis trait allows for partial equality, for types that do not have a full\nequivalence relation. For example, in floating point numbers `NaN != NaN`,\nso floating point types implement `PartialEq` but not [`trait@Eq`].\n\nImplementations must ensure that `eq` and `ne` are consistent with each other:\n\n- `a != b` if and only if `!(a == b)`\n (ensured by the default implementation).\n\nIf [`PartialOrd`] or [`Ord`] are also implemented for `Self` and `Rhs`, their methods must also\nbe consistent with `PartialEq` (see the documentation of those traits for the exact\nrequirements). It's easy to accidentally make them disagree by deriving some of the traits and\nmanually implementing others.\n\nThe equality relation `==` must satisfy the following conditions\n(for all `a`, `b`, `c` of type `A`, `B`, `C`):\n\n- **Symmetric**: if `A: PartialEq<B>` and `B: PartialEq<A>`, then **`a == b`\n implies `b == a`**; and\n\n- **Transitive**: if `A: PartialEq<B>` and `B: PartialEq<C>` and `A:\n PartialEq<C>`, then **`a == b` and `b == c` implies `a == c`**.\n\nNote that the `B: PartialEq<A>` (symmetric) and `A: PartialEq<C>`\n(transitive) impls are not forced to exist, but these requirements apply\nwhenever they do exist.\n\n## Derivable\n\nThis trait can be used with `#[derive]`. When `derive`d on structs, two\ninstances are equal if all fields are equal, and not equal if any fields\nare not equal. When `derive`d on enums, each variant is equal to itself\nand not equal to the other variants.\n\n## How can I implement `PartialEq`?\n\nAn example implementation for a domain in which two books are considered\nthe same book if their ISBN matches, even if the formats differ:\n\n```rust\nenum BookFormat {\n Paperback,\n Hardback,\n Ebook,\n}\n\nstruct Book {\n isbn: i32,\n format: BookFormat,\n}\n\nimpl PartialEq for Book {\n fn eq(&self, other: &Self) -> bool {\n self.isbn == other.isbn\n }\n}\n\nlet b1 = Book { isbn: 3, format: BookFormat::Paperback };\nlet b2 = Book { isbn: 3, format: BookFormat::Ebook };\nlet b3 = Book { isbn: 10, format: BookFormat::Paperback };\n\nassert!(b1 == b2);\nassert!(b1 != b3);\n```\n\n## How can I compare two different types?\n\nThe type you can compare with is controlled by `PartialEq`'s type parameter.\nFor example, let's tweak our previous code a bit:\n\n```rust\n// The derive implements <BookFormat> == <BookFormat> comparisons\n#[derive(PartialEq)]\nenum BookFormat {\n Paperback,\n Hardback,\n Ebook,\n}\n\nstruct Book {\n isbn: i32,\n format: BookFormat,\n}\n\n// Implement <Book> == <BookFormat> comparisons\nimpl PartialEq<BookFormat> for Book {\n fn eq(&self, other: &BookFormat) -> bool {\n self.format == *other\n }\n}\n\n// Implement <BookFormat> == <Book> comparisons\nimpl PartialEq<Book> for BookFormat {\n fn eq(&self, other: &Book) -> bool {\n *self == other.format\n }\n}\n\nlet b1 = Book { isbn: 3, format: BookFormat::Paperback };\n\nassert!(b1 == BookFormat::Paperback);\nassert!(BookFormat::Ebook != b1);\n```\n\nBy changing `impl PartialEq for Book` to `impl PartialEq<BookFormat> for Book`,\nwe allow `BookFormat`s to be compared with `Book`s.\n\nA comparison like the one above, which ignores some fields of the struct,\ncan be dangerous. It can easily lead to an unintended violation of the\nrequirements for a partial equivalence relation. For example, if we kept\nthe above implementation of `PartialEq<Book>` for `BookFormat` and added an\nimplementation of `Par'
25.889052 RECV on 0(out): 'tialEq<Book>` for `Book` (either via a `#[derive]` or\nvia the manual implementation from the first example) then the result would\nviolate transitivity:\n\n```rust\n#[derive(PartialEq)]\nenum BookFormat {\n Paperback,\n Hardback,\n Ebook,\n}\n\n#[derive(PartialEq)]\nstruct Book {\n isbn: i32,\n format: BookFormat,\n}\n\nimpl PartialEq<BookFormat> for Book {\n fn eq(&self, other: &BookFormat) -> bool {\n self.format == *other\n }\n}\n\nimpl PartialEq<Book> for BookFormat {\n fn eq(&self, other: &Book) -> bool {\n *self == other.format\n }\n}\n\nfn main() {\n let b1 = Book { isbn: 1, format: BookFormat::Paperback };\n let b2 = Book { isbn: 2, format: BookFormat::Paperback };\n\n assert!(b1 == BookFormat::Paperback);\n assert!(BookFormat::Paperback == b2);\n\n // The following should hold by transitivity but doesn't.\n assert!(b1 == b2); // <-- PANICS\n}\n```\n\n# Examples\n\n```rust\nlet x: u32 = 0;\nlet y: u32 = 1;\n\nassert_eq!(x == y, false);\nassert_eq!(x.eq(&y), false);\n```\n\n[`eq`]: PartialEq::eq\n[`ne`]: PartialEq::ne"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"PartialEq","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"PartialEq"},"additionalTextEdits":[]},{"label":"RustcEncodable","kind":18,"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"RustcEncodable","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"RustcEncodable"},"additionalTextEdits":[]},{"label":"Drop","kind":8,"documentation":{"kind":"markdown","value":"Custom code within the destructor.\n\nWhen a value is no longer needed, Rust will run a \"destructor\" on that value.\nThe most common way that a value is no longer needed is when it goes out of\nscope. Destructors may still run in other circumstances, but we're going to\nfocus on scope for the examples here. To learn about some of those other cases,\nplease see [the reference] section on destructors.\n\n[the reference]: https://doc.rust-lang.org/reference/destructors.html\n\nThis destructor consists of two components:\n- A call to `Drop::drop` for that value, if this special `Drop` trait is implemented for its type.\n- The automatically generated \"drop glue\" which recursively calls the destructors\n of all the fields of this value.\n\nAs Rust automatically calls the destructors of all contained fields,\nyou don't have to implement `Drop` in most cases. But there are some cases where\nit is useful, for example for types which directly manage a resource.\nThat resource may be memory, it may be a file descriptor, it may be a network socket.\nOnce a value of that type is no longer going to be used, it should \"clean up\" its\nresource by freeing the memory or closing the file or socket. This is\nthe job of a destructor, and therefore the job of `Drop::drop`.\n\n## Examples\n\nTo see destructors in action, let's take a look at the following program:\n\n```rust\nstruct HasDrop;\n\nimpl Drop for HasDrop {\n fn drop(&mut self) {\n println!(\"Dropping HasDrop!\");\n }\n}\n\nstruct HasTwoDrops {\n one: HasDrop,\n two: HasDrop,\n}\n\nimpl Drop for HasTwoDrops {\n fn drop(&mut self) {\n println!(\"Dropping HasTwoDrops!\");\n }\n}\n\nfn main() {\n let _x = HasTwoDrops { one: HasDrop, two: HasDrop };\n println!(\"Running!\");\n}\n```\n\nRust will first call `Drop::drop` for `_x` and then for both `_x.one` and `_x.two`,\nmeaning that running this will print\n\n```text\nRunning!\nDropping HasTwoDrops!\nDropping HasDrop!\nDropping HasDrop!\n```\n\nEven if we remove the implementation of `Drop` for `HasTwoDrop`, the destructors of its fields are still called.\nThis would result in\n\n```test\nRunning!\nDropping HasDrop!\nDropping HasDrop!\n```\n\n## You cannot call `Drop::drop` yourself\n\nBecause `Drop::drop` is used to clean up a value, it may be dangerous to use this value after\nthe method has been called. As `Drop::drop` does not take ownership of its input,\nRust prev'
25.889136 RECV on 0(out): 'ents misuse by not allowing you to call `Drop::drop` directly.\n\nIn other words, if you tried to explicitly call `Drop::drop` in the above example, you'd get a compiler error.\n\nIf you'd like to explicitly call the destructor of a value, [`mem::drop`] can be used instead.\n\n[`mem::drop`]: drop\n\n## Drop order\n\nWhich of our two `HasDrop` drops first, though? For structs, it's the same\norder that they're declared: first `one`, then `two`. If you'd like to try\nthis yourself, you can modify `HasDrop` above to contain some data, like an\ninteger, and then use it in the `println!` inside of `Drop`. This behavior is\nguaranteed by the language.\n\nUnlike for structs, local variables are dropped in reverse order:\n\n```rust\nstruct Foo;\n\nimpl Drop for Foo {\n fn drop(&mut self) {\n println!(\"Dropping Foo!\")\n }\n}\n\nstruct Bar;\n\nimpl Drop for Bar {\n fn drop(&mut self) {\n println!(\"Dropping Bar!\")\n }\n}\n\nfn main() {\n let _foo = Foo;\n let _bar = Bar;\n}\n```\n\nThis will print\n\n```text\nDropping Bar!\nDropping Foo!\n```\n\nPlease see [the reference] for the full rules.\n\n[the reference]: https://doc.rust-lang.org/reference/destructors.html\n\n## `Copy` and `Drop` are exclusive\n\nYou cannot implement both [`Copy`] and `Drop` on the same type. Types that\nare `Copy` get implicitly duplicated by the compiler, making it very\nhard to predict when, and how often destructors will be executed. As such,\nthese types cannot have destructors."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Drop","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Drop"},"additionalTextEdits":[]},{"label":"None","kind":20,"detail":"None","documentation":{"kind":"markdown","value":"No value."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"None","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"None$0"},"additionalTextEdits":[]},{"label":"ToString","kind":8,"documentation":{"kind":"markdown","value":"A trait for converting a value to a `String`.\n\nThis trait is automatically implemented for any type which implements the\n[`Display`] trait. As such, `ToString` shouldn't be implemented directly:\n[`Display`] should be implemented instead, and you get the `ToString`\nimplementation for free.\n\n[`Display`]: fmt::Display"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"ToString","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"ToString"},"additionalTextEdits":[]},{"label":"drop(…)","kind":3,"detail":"fn(T)","documentation":{"kind":"markdown","value":"Disposes of a value.\n\nThis does so by calling the argument's implementation of [`Drop`][drop].\n\nThis effectively does nothing for types which implement `Copy`, e.g.\nintegers. Such values are copied and _then_ moved into the function, so the\nvalue persists after this function call.\n\nThis function is not magic; it is literally defined as\n\n```rust\npub fn drop<T>(_x: T) { }\n```\n\nBecause `_x` is moved into the function, it is automatically dropped before\nthe function returns.\n\n[drop]: Drop\n\n# Examples\n\nBasic usage:\n\n```rust\nlet v = vec![1, 2, 3];\n\ndrop(v); // explicitly drop the vector\n```\n\nSince [`RefCell`] enforces the borrow rules at runtime, `drop` can\nrelease a [`RefCell`] borrow:\n\n```rust\nuse std::cell::RefCell;\n\nlet x = RefCell::new(1);\n\nlet mut mutable_borrow = x.borrow_mut();\n*mutable_borrow = 1;\n\ndrop(mutable_borrow); // relinquish the mutable borrow on this slot\n\nlet borrow = x.borrow();\nprintln!(\"{}\", *borrow);\n```\n\nIntegers and other types implementing [`Copy`] are unaffected by `drop`.\n\n```rust\n#[derive(Copy, Clone)]\nstruct Foo(u8);\n\nlet x = 1;\nlet y = Foo(2);\ndrop(x); // a copy of `x` is moved and dropped\ndrop(y); // a copy of `y` is moved and dropped\n\nprintln!(\"x: {}, y: {}\", x, y.0); // still available\n```\n\n[`RefCell`]: crate::cell::RefCell"},"depr'
25.889144 RECV on 0(out): 'ecated":false,"preselect":true,"sortText":"fffffff1","filterText":"drop","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"drop(${1:x})$0"},"additionalTextEdits":[],"command":{"title":"triggerParameterHints","command":"editor.action.triggerParameterHints"}},{"label":"PartialOrd","kind":8,"documentation":{"kind":"markdown","value":"Trait for types that form a [partial order](https://en.wikipedia.org/wiki/Partial_order).\n\nThe `lt`, `le`, `gt`, and `ge` methods of this trait can be called using\nthe `<`, `<=`, `>`, and `>=` operators, respectively.\n\nThe methods of this trait must be consistent with each other and with those of `PartialEq` in\nthe following sense:\n\n- `a == b` if and only if `partial_cmp(a, b) == Some(Equal)`.\n- `a < b` if and only if `partial_cmp(a, b) == Some(Less)`\n (ensured by the default implementation).\n- `a > b` if and only if `partial_cmp(a, b) == Some(Greater)`\n (ensured by the default implementation).\n- `a <= b` if and only if `a < b || a == b`\n (ensured by the default implementation).\n- `a >= b` if and only if `a > b || a == b`\n (ensured by the default implementation).\n- `a != b` if and only if `!(a == b)` (already part of `PartialEq`).\n\nIf [`Ord`] is also implemented for `Self` and `Rhs`, it must also be consistent with\n`partial_cmp` (see the documentation of that trait for the exact requirements). It's\neasy to accidentally make them disagree by deriving some of the traits and manually\nimplementing others.\n\nThe comparison must satisfy, for all `a`, `b` and `c`:\n\n- transitivity: `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.\n- duality: `a < b` if and only if `b > a`.\n\nNote that these requirements mean that the trait itself must be implemented symmetrically and\ntransitively: if `T: PartialOrd<U>` and `U: PartialOrd<V>` then `U: PartialOrd<T>` and `T:\nPartialOrd<V>`.\n\n## Corollaries\n\nThe following corollaries follow from the above requirements:\n\n- irreflexivity of `<` and `>`: `!(a < a)`, `!(a > a)`\n- transitivity of `>`: if `a > b` and `b > c` then `a > c`\n- duality of `partial_cmp`: `partial_cmp(a, b) == partial_cmp(b, a).map(Ordering::reverse)`\n\n## Derivable\n\nThis trait can be used with `#[derive]`.\n\nWhen `derive`d on structs, it will produce a\n[lexicographic](https://en.wikipedia.org/wiki/Lexicographic_order) ordering\nbased on the top-to-bottom declaration order of the struct's members.\n\nWhen `derive`d on enums, variants are ordered by their discriminants.\nBy default, the discriminant is smallest for variants at the top, and\nlargest for variants at the bottom. Here's an example:\n\n```rust\n#[derive(PartialEq, PartialOrd)]\nenum E {\n Top,\n Bottom,\n}\n\nassert!(E::Top < E::Bottom);\n```\n\nHowever, manually setting the discriminants can override this default\nbehavior:\n\n```rust\n#[derive(PartialEq, PartialOrd)]\nenum E {\n Top = 2,\n Bottom = 1,\n}\n\nassert!(E::Bottom < E::Top);\n```\n\n## How can I implement `PartialOrd`?\n\n`PartialOrd` only requires implementation of the [`partial_cmp`] method, with the others\ngenerated from default implementations.\n\nHowever it remains possible to implement the others separately for types which do not have a\ntotal order. For example, for floating point numbers, `NaN < 0 == false` and `NaN >= 0 ==\nfalse` (cf. IEEE 754-2008 section 5.11).\n\n`PartialOrd` requires your type to be [`PartialEq`].\n\nIf your type is [`Ord`], you can implement [`partial_cmp`] by using [`cmp`]:\n\n```rust\nuse std::cmp::Ordering;\n\n#[derive(Eq)]\nstruct Person {\n id: u32,\n name: String,\n height: u32,\n}\n\nimpl PartialOrd for Person {\n fn partial_cmp(&self, other: &Self) -> Option<Ordering> {\n Some(self.cmp(other))\n }\n}\n\nimpl Ord for Person {\n fn cmp(&self, other: &Self) -> Ordering {\n self.height.cmp(&other.height)\n }\n}\n\nimpl PartialEq for Person {\n fn eq(&self, other: &Self) -> bool {\n self.height == other.height\n }\n}\n```\n\nYou may also find '
25.889172 RECV on 0(out): 'it useful to use [`partial_cmp`] on your type's fields. Here\nis an example of `Person` types who have a floating-point `height` field that\nis the only field to be used for sorting:\n\n```rust\nuse std::cmp::Ordering;\n\nstruct Person {\n id: u32,\n name: String,\n height: f64,\n}\n\nimpl PartialOrd for Person {\n fn partial_cmp(&self, other: &Self) -> Option<Ordering> {\n self.height.partial_cmp(&other.height)\n }\n}\n\nimpl PartialEq for Person {\n fn eq(&self, other: &Self) -> bool {\n self.height == other.height\n }\n}\n```\n\n# Examples\n\n```rust\nlet x: u32 = 0;\nlet y: u32 = 1;\n\nassert_eq!(x < y, true);\nassert_eq!(x.lt(&y), true);\n```\n\n[`partial_cmp`]: PartialOrd::partial_cmp\n[`cmp`]: Ord::cmp"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"PartialOrd","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"PartialOrd"},"additionalTextEdits":[]},{"label":"Option","kind":13,"documentation":{"kind":"markdown","value":"The `Option` type. See [the module level documentation](self) for more."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Option","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Option"},"additionalTextEdits":[]},{"label":"Copy","kind":8,"documentation":{"kind":"markdown","value":"Types whose values can be duplicated simply by copying bits.\n\nBy default, variable bindings have 'move semantics.' In other\nwords:\n\n```rust\n#[derive(Debug)]\nstruct Foo;\n\nlet x = Foo;\n\nlet y = x;\n\n// `x` has moved into `y`, and so cannot be used\n\n// println!(\"{:?}\", x); // error: use of moved value\n```\n\nHowever, if a type implements `Copy`, it instead has 'copy semantics':\n\n```rust\n// We can derive a `Copy` implementation. `Clone` is also required, as it's\n// a supertrait of `Copy`.\n#[derive(Debug, Copy, Clone)]\nstruct Foo;\n\nlet x = Foo;\n\nlet y = x;\n\n// `y` is a copy of `x`\n\nprintln!(\"{:?}\", x); // A-OK!\n```\n\nIt's important to note that in these two examples, the only difference is whether you\nare allowed to access `x` after the assignment. Under the hood, both a copy and a move\ncan result in bits being copied in memory, although this is sometimes optimized away.\n\n## How can I implement `Copy`?\n\nThere are two ways to implement `Copy` on your type. The simplest is to use `derive`:\n\n```rust\n#[derive(Copy, Clone)]\nstruct MyStruct;\n```\n\nYou can also implement `Copy` and `Clone` manually:\n\n```rust\nstruct MyStruct;\n\nimpl Copy for MyStruct { }\n\nimpl Clone for MyStruct {\n fn clone(&self) -> MyStruct {\n *self\n }\n}\n```\n\nThere is a small difference between the two: the `derive` strategy will also place a `Copy`\nbound on type parameters, which isn't always desired.\n\n## What's the difference between `Copy` and `Clone`?\n\nCopies happen implicitly, for example as part of an assignment `y = x`. The behavior of\n`Copy` is not overloadable; it is always a simple bit-wise copy.\n\nCloning is an explicit action, `x.clone()`. The implementation of [`Clone`] can\nprovide any type-specific behavior necessary to duplicate values safely. For example,\nthe implementation of [`Clone`] for [`String`] needs to copy the pointed-to string\nbuffer in the heap. A simple bitwise copy of [`String`] values would merely copy the\npointer, leading to a double free down the line. For this reason, [`String`] is [`Clone`]\nbut not `Copy`.\n\n[`Clone`] is a supertrait of `Copy`, so everything which is `Copy` must also implement\n[`Clone`]. If a type is `Copy` then its [`Clone`] implementation only needs to return `*self`\n(see the example above).\n\n## When can my type be `Copy`?\n\nA type can implement `Copy` if all of its components implement `Copy`. For example, this\nstruct can be `Copy`:\n\n```rust\n#[derive(Copy, Clone)]\nstruct Point {\n x: i32,\n y: i32,\n}\n```\n\nA struct can be `Copy`, and [`i32`] is `Copy`, therefore `Point` is eligible to be `Copy`.\nBy contrast, consider\n\n```rust\nstruc'
25.889179 RECV on 0(out): 't PointList {\n points: Vec<Point>,\n}\n```\n\nThe struct `PointList` cannot implement `Copy`, because [`Vec<T>`] is not `Copy`. If we\nattempt to derive a `Copy` implementation, we'll get an error:\n\n```text\nthe trait `Copy` may not be implemented for this type; field `points` does not implement `Copy`\n```\n\nShared references (`&T`) are also `Copy`, so a type can be `Copy`, even when it holds\nshared references of types `T` that are *not* `Copy`. Consider the following struct,\nwhich can implement `Copy`, because it only holds a *shared reference* to our non-`Copy`\ntype `PointList` from above:\n\n```rust\n#[derive(Copy, Clone)]\nstruct PointListWrapper<'a> {\n point_list_ref: &'a PointList,\n}\n```\n\n## When *can't* my type be `Copy`?\n\nSome types can't be copied safely. For example, copying `&mut T` would create an aliased\nmutable reference. Copying [`String`] would duplicate responsibility for managing the\n[`String`]'s buffer, leading to a double free.\n\nGeneralizing the latter case, any type implementing [`Drop`] can't be `Copy`, because it's\nmanaging some resource besides its own [`size_of::<T>`] bytes.\n\nIf you try to implement `Copy` on a struct or enum containing non-`Copy` data, you will get\nthe error [E0204].\n\n[E0204]: ../../error-index.html#E0204\n\n## When *should* my type be `Copy`?\n\nGenerally speaking, if your type _can_ implement `Copy`, it should. Keep in mind, though,\nthat implementing `Copy` is part of the public API of your type. If the type might become\nnon-`Copy` in the future, it could be prudent to omit the `Copy` implementation now, to\navoid a breaking API change.\n\n## Additional implementors\n\nIn addition to the [implementors listed below][impls],\nthe following types also implement `Copy`:\n\n* Function item types (i.e., the distinct types defined for each function)\n* Function pointer types (e.g., `fn() -> i32`)\n* Tuple types, if each component also implements `Copy` (e.g., `()`, `(i32, bool)`)\n* Closure types, if they capture no value from the environment\n or if all such captured values implement `Copy` themselves.\n Note that variables captured by shared reference always implement `Copy`\n (even if the referent doesn't),\n while variables captured by mutable reference never implement `Copy`.\n\n[`Vec<T>`]: ../../std/vec/struct.Vec.html\n[`String`]: ../../std/string/struct.String.html\n[`size_of::<T>`]: crate::mem::size_of\n[impls]: #implementors"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Copy","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Copy"},"additionalTextEdits":[]},{"label":"TryFrom","kind":8,"documentation":{"kind":"markdown","value":"Simple and safe type conversions that may fail in a controlled\nway under some circumstances. It is the reciprocal of [`TryInto`].\n\nThis is useful when you are doing a type conversion that may\ntrivially succeed but may also need special handling.\nFor example, there is no way to convert an [`i64`] into an [`i32`]\nusing the [`From`] trait, because an [`i64`] may contain a value\nthat an [`i32`] cannot represent and so the conversion would lose data.\nThis might be handled by truncating the [`i64`] to an [`i32`] (essentially\ngiving the [`i64`]'s value modulo [`i32::MAX`]) or by simply returning\n[`i32::MAX`], or by some other method. The [`From`] trait is intended\nfor perfect conversions, so the `TryFrom` trait informs the\nprogrammer when a type conversion could go bad and lets them\ndecide how to handle it.\n\n# Generic Implementations\n\n- `TryFrom<T> for U` implies [`TryInto`]`<U> for T`\n- [`try_from`] is reflexive, which means that `TryFrom<T> for T`\nis implemented and cannot fail -- the associated `Error` type for\ncalling `T::try_from()` on a value of type `T` is [`Infallible`].\nWhen the [`!`] type is stabilized [`Infallible`] and [`!`] will be\nequivalent.\n\n`TryFrom<T>` can be implemented as follows:\n\n```rust\nstruct GreaterThanZero(i32);\n\nimpl TryFrom<i32> for GreaterThanZero {\n type Error = &'static str;\n\n f'
25.889198 RECV on 0(out): 'n try_from(value: i32) -> Result<Self, Self::Error> {\n if value <= 0 {\n Err(\"GreaterThanZero only accepts value superior than zero!\")\n } else {\n Ok(GreaterThanZero(value))\n }\n }\n}\n```\n\n# Examples\n\nAs described, [`i32`] implements `TryFrom<`[`i64`]`>`:\n\n```rust\nlet big_number = 1_000_000_000_000i64;\n// Silently truncates `big_number`, requires detecting\n// and handling the truncation after the fact.\nlet smaller_number = big_number as i32;\nassert_eq!(smaller_number, -727379968);\n\n// Returns an error because `big_number` is too big to\n// fit in an `i32`.\nlet try_smaller_number = i32::try_from(big_number);\nassert!(try_smaller_number.is_err());\n\n// Returns `Ok(3)`.\nlet try_successful_smaller_number = i32::try_from(3);\nassert!(try_successful_smaller_number.is_ok());\n```\n\n[`try_from`]: TryFrom::try_from"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"TryFrom","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"TryFrom"},"additionalTextEdits":[]},{"label":"String","kind":22,"documentation":{"kind":"markdown","value":"A UTF-8–encoded, growable string.\n\nThe `String` type is the most common string type that has ownership over the\ncontents of the string. It has a close relationship with its borrowed\ncounterpart, the primitive [`str`].\n\n# Examples\n\nYou can create a `String` from [a literal string][`&str`] with [`String::from`]:\n\n[`String::from`]: From::from\n\n```rust\nlet hello = String::from(\"Hello, world!\");\n```\n\nYou can append a [`char`] to a `String` with the [`push`] method, and\nappend a [`&str`] with the [`push_str`] method:\n\n```rust\nlet mut hello = String::from(\"Hello, \");\n\nhello.push('w');\nhello.push_str(\"orld!\");\n```\n\n[`push`]: String::push\n[`push_str`]: String::push_str\n\nIf you have a vector of UTF-8 bytes, you can create a `String` from it with\nthe [`from_utf8`] method:\n\n```rust\n// some bytes, in a vector\nlet sparkle_heart = vec![240, 159, 146, 150];\n\n// We know these bytes are valid, so we'll use `unwrap()`.\nlet sparkle_heart = String::from_utf8(sparkle_heart).unwrap();\n\nassert_eq!(\"💖\", sparkle_heart);\n```\n\n[`from_utf8`]: String::from_utf8\n\n# UTF-8\n\n`String`s are always valid UTF-8. This has a few implications, the first of\nwhich is that if you need a non-UTF-8 string, consider [`OsString`]. It is\nsimilar, but without the UTF-8 constraint. The second implication is that\nyou cannot index into a `String`:\n\n```rust\nlet s = \"hello\";\n\nprintln!(\"The first letter of s is {}\", s[0]); // ERROR!!!\n```\n\n[`OsString`]: ../../std/ffi/struct.OsString.html \"ffi::OsString\"\n\nIndexing is intended to be a constant-time operation, but UTF-8 encoding\ndoes not allow us to do this. Furthermore, it's not clear what sort of\nthing the index should return: a byte, a codepoint, or a grapheme cluster.\nThe [`bytes`] and [`chars`] methods return iterators over the first\ntwo, respectively.\n\n[`bytes`]: str::bytes\n[`chars`]: str::chars\n\n# Deref\n\n`String` implements <code>[Deref]<Target = [str]></code>, and so inherits all of [`str`]'s\nmethods. In addition, this means that you can pass a `String` to a\nfunction which takes a [`&str`] by using an ampersand (`&`):\n\n```rust\nfn takes_str(s: &str) { }\n\nlet s = String::from(\"Hello\");\n\ntakes_str(&s);\n```\n\nThis will create a [`&str`] from the `String` and pass it in. This\nconversion is very inexpensive, and so generally, functions will accept\n[`&str`]s as arguments unless they need a `String` for some specific\nreason.\n\nIn certain cases Rust doesn't have enough information to make this\nconversion, known as [`Deref`] coercion. In the following example a string\nslice [`&'a str`][`&str`] implements the trait `TraitExample`, and the function\n`example_func` takes anything that implements the trait. In this case Rust\nwould need to make two implicit conversions, which Rust doesn't have the\nmeans to do. For that reason, the following example will not compile.\n\n```rus'
25.889205 RECV on 0(out): 't\ntrait TraitExample {}\n\nimpl<'a> TraitExample for &'a str {}\n\nfn example_func<A: TraitExample>(example_arg: A) {}\n\nlet example_string = String::from(\"example_string\");\nexample_func(&example_string);\n```\n\nThere are two options that would work instead. The first would be to\nchange the line `example_func(&example_string);` to\n`example_func(example_string.as_str());`, using the method [`as_str()`]\nto explicitly extract the string slice containing the string. The second\nway changes `example_func(&example_string);` to\n`example_func(&*example_string);`. In this case we are dereferencing a\n`String` to a [`str`], then referencing the [`str`] back to\n[`&str`]. The second way is more idiomatic, however both work to do the\nconversion explicitly rather than relying on the implicit conversion.\n\n# Representation\n\nA `String` is made up of three components: a pointer to some bytes, a\nlength, and a capacity. The pointer points to an internal buffer `String`\nuses to store its data. The length is the number of bytes currently stored\nin the buffer, and the capacity is the size of the buffer in bytes. As such,\nthe length will always be less than or equal to the capacity.\n\nThis buffer is always stored on the heap.\n\nYou can look at these with the [`as_ptr`], [`len`], and [`capacity`]\nmethods:\n\n```rust\nuse std::mem;\n\nlet story = String::from(\"Once upon a time...\");\n\n// Prevent automatically dropping the String's data\nlet mut story = mem::ManuallyDrop::new(story);\n\nlet ptr = story.as_mut_ptr();\nlet len = story.len();\nlet capacity = story.capacity();\n\n// story has nineteen bytes\nassert_eq!(19, len);\n\n// We can re-build a String out of ptr, len, and capacity. This is all\n// unsafe because we are responsible for making sure the components are\n// valid:\nlet s = unsafe { String::from_raw_parts(ptr, len, capacity) } ;\n\nassert_eq!(String::from(\"Once upon a time...\"), s);\n```\n\n[`as_ptr`]: str::as_ptr\n[`len`]: String::len\n[`capacity`]: String::capacity\n\nIf a `String` has enough capacity, adding elements to it will not\nre-allocate. For example, consider this program:\n\n```rust\nlet mut s = String::new();\n\nprintln!(\"{}\", s.capacity());\n\nfor _ in 0..5 {\n s.push_str(\"hello\");\n println!(\"{}\", s.capacity());\n}\n```\n\nThis will output the following:\n\n```text\n0\n5\n10\n20\n20\n40\n```\n\nAt first, we have no memory allocated at all, but as we append to the\nstring, it increases its capacity appropriately. If we instead use the\n[`with_capacity`] method to allocate the correct capacity initially:\n\n```rust\nlet mut s = String::with_capacity(25);\n\nprintln!(\"{}\", s.capacity());\n\nfor _ in 0..5 {\n s.push_str(\"hello\");\n println!(\"{}\", s.capacity());\n}\n```\n\n[`with_capacity`]: String::with_capacity\n\nWe end up with a different output:\n\n```text\n25\n25\n25\n25\n25\n25\n```\n\nHere, there's no need to allocate more memory inside the loop.\n\n[str]: prim@str \"str\"\n[`str`]: prim@str \"str\"\n[`&str`]: prim@str \"&str\"\n[Deref]: core::ops::Deref \"ops::Deref\"\n[`Deref`]: core::ops::Deref \"ops::Deref\"\n[`as_str()`]: String::as_str"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"String","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"String"},"additionalTextEdits":[]},{"label":"Eq","kind":8,"documentation":{"kind":"markdown","value":"Trait for equality comparisons which are [equivalence relations](\nhttps://en.wikipedia.org/wiki/Equivalence_relation).\n\nThis means, that in addition to `a == b` and `a != b` being strict inverses, the equality must\nbe (for all `a`, `b` and `c`):\n\n- reflexive: `a == a`;\n- symmetric: `a == b` implies `b == a`; and\n- transitive: `a == b` and `b == c` implies `a == c`.\n\nThis property cannot be checked by the compiler, and therefore `Eq` implies\n[`PartialEq`], and has no extra methods.\n\n## Derivable\n\nThis trait can be used with `#[derive]`. When `derive`d, because `Eq` has\nno extra methods, it is only informing the compiler that this is an\'
25.889226 RECV on 0(out): 'nequivalence relation rather than a partial equivalence relation. Note that\nthe `derive` strategy requires all fields are `Eq`, which isn't\nalways desired.\n\n## How can I implement `Eq`?\n\nIf you cannot use the `derive` strategy, specify that your type implements\n`Eq`, which has no methods:\n\n```rust\nenum BookFormat { Paperback, Hardback, Ebook }\nstruct Book {\n isbn: i32,\n format: BookFormat,\n}\nimpl PartialEq for Book {\n fn eq(&self, other: &Self) -> bool {\n self.isbn == other.isbn\n }\n}\nimpl Eq for Book {}\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Eq","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Eq"},"additionalTextEdits":[]},{"label":"Into","kind":8,"documentation":{"kind":"markdown","value":"A value-to-value conversion that consumes the input value. The\nopposite of [`From`].\n\nOne should avoid implementing [`Into`] and implement [`From`] instead.\nImplementing [`From`] automatically provides one with an implementation of [`Into`]\nthanks to the blanket implementation in the standard library.\n\nPrefer using [`Into`] over [`From`] when specifying trait bounds on a generic function\nto ensure that types that only implement [`Into`] can be used as well.\n\n**Note: This trait must not fail**. If the conversion can fail, use [`TryInto`].\n\n# Generic Implementations\n\n- [`From`]`<T> for U` implies `Into<U> for T`\n- [`Into`] is reflexive, which means that `Into<T> for T` is implemented\n\n# Implementing [`Into`] for conversions to external types in old versions of Rust\n\nPrior to Rust 1.41, if the destination type was not part of the current crate\nthen you couldn't implement [`From`] directly.\nFor example, take this code:\n\n```rust\nstruct Wrapper<T>(Vec<T>);\nimpl<T> From<Wrapper<T>> for Vec<T> {\n fn from(w: Wrapper<T>) -> Vec<T> {\n w.0\n }\n}\n```\nThis will fail to compile in older versions of the language because Rust's orphaning rules\nused to be a little bit more strict. To bypass this, you could implement [`Into`] directly:\n\n```rust\nstruct Wrapper<T>(Vec<T>);\nimpl<T> Into<Vec<T>> for Wrapper<T> {\n fn into(self) -> Vec<T> {\n self.0\n }\n}\n```\n\nIt is important to understand that [`Into`] does not provide a [`From`] implementation\n(as [`From`] does with [`Into`]). Therefore, you should always try to implement [`From`]\nand then fall back to [`Into`] if [`From`] can't be implemented.\n\n# Examples\n\n[`String`] implements [`Into`]`<`[`Vec`]`<`[`u8`]`>>`:\n\nIn order to express that we want a generic function to take all arguments that can be\nconverted to a specified type `T`, we can use a trait bound of [`Into`]`<T>`.\nFor example: The function `is_hello` takes all arguments that can be converted into a\n[`Vec`]`<`[`u8`]`>`.\n\n```rust\nfn is_hello<T: Into<Vec<u8>>>(s: T) {\n let bytes = b\"hello\".to_vec();\n assert_eq!(bytes, s.into());\n}\n\nlet s = \"hello\".to_string();\nis_hello(s);\n```\n\n[`String`]: ../../std/string/struct.String.html\n[`Vec`]: ../../std/vec/struct.Vec.html"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Into","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Into"},"additionalTextEdits":[]},{"label":"Clone","kind":8,"documentation":{"kind":"markdown","value":"A common trait for the ability to explicitly duplicate an object.\n\nDiffers from [`Copy`] in that [`Copy`] is implicit and an inexpensive bit-wise copy, while\n`Clone` is always explicit and may or may not be expensive. In order to enforce\nthese characteristics, Rust does not allow you to reimplement [`Copy`], but you\nmay reimplement `Clone` and run arbitrary code.\n\nSince `Clone` is more general than [`Copy`], you can automatically make anything\n[`Copy`] be `Clone` as well.\n\n## Derivable\n\nThis trait can be used with `#[derive]` if all fields are `Clone`. The `derive`d\nimplementation of [`Clone`] calls [`clone`] on each field.\n\n[`clone`]: Clone::clone\n\nFor a generic struct, `#[deriv'
25.889233 RECV on 0(out): 'e]` implements `Clone` conditionally by adding bound `Clone` on\ngeneric parameters.\n\n```rust\n// `derive` implements Clone for Reading<T> when T is Clone.\n#[derive(Clone)]\nstruct Reading<T> {\n frequency: T,\n}\n```\n\n## How can I implement `Clone`?\n\nTypes that are [`Copy`] should have a trivial implementation of `Clone`. More formally:\nif `T: Copy`, `x: T`, and `y: &T`, then `let x = y.clone();` is equivalent to `let x = *y;`.\nManual implementations should be careful to uphold this invariant; however, unsafe code\nmust not rely on it to ensure memory safety.\n\nAn example is a generic struct holding a function pointer. In this case, the\nimplementation of `Clone` cannot be `derive`d, but can be implemented as:\n\n```rust\nstruct Generate<T>(fn() -> T);\n\nimpl<T> Copy for Generate<T> {}\n\nimpl<T> Clone for Generate<T> {\n fn clone(&self) -> Self {\n *self\n }\n}\n```\n\n## Additional implementors\n\nIn addition to the [implementors listed below][impls],\nthe following types also implement `Clone`:\n\n* Function item types (i.e., the distinct types defined for each function)\n* Function pointer types (e.g., `fn() -> i32`)\n* Tuple types, if each component also implements `Clone` (e.g., `()`, `(i32, bool)`)\n* Closure types, if they capture no value from the environment\n or if all such captured values implement `Clone` themselves.\n Note that variables captured by shared reference always implement `Clone`\n (even if the referent doesn't),\n while variables captured by mutable reference never implement `Clone`.\n\n[impls]: #implementors"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Clone","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Clone"},"additionalTextEdits":[]},{"label":"Result","kind":13,"documentation":{"kind":"markdown","value":"`Result` is a type that represents either success ([`Ok`]) or failure ([`Err`]).\n\nSee the [module documentation](self) for details."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Result","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Result"},"additionalTextEdits":[]},{"label":"TryInto","kind":8,"documentation":{"kind":"markdown","value":"An attempted conversion that consumes `self`, which may or may not be\nexpensive.\n\nLibrary authors should usually not directly implement this trait,\nbut should prefer implementing the [`TryFrom`] trait, which offers\ngreater flexibility and provides an equivalent `TryInto`\nimplementation for free, thanks to a blanket implementation in the\nstandard library. For more information on this, see the\ndocumentation for [`Into`].\n\n# Implementing `TryInto`\n\nThis suffers the same restrictions and reasoning as implementing\n[`Into`], see there for details."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"TryInto","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"TryInto"},"additionalTextEdits":[]},{"label":"Box","kind":22,"documentation":{"kind":"markdown","value":"A pointer type for heap allocation.\n\nSee the [module-level documentation](../../std/boxed/index.html) for more."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Box","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Box"},"additionalTextEdits":[]},{"label":"FromIterator","kind":8,"documentation":{"kind":"markdown","value":"Conversion from an [`Iterator`].\n\nBy implementing `FromIterator` for a type, you define how it will be\ncreated from an iterator. This is common for types which describe a\ncollection of some kind.\n\n[`FromIterator::from_iter()`] is rarely called explicitly, and is instead\nused through [`Iterator::collect()`] method. See [`Iterator::collect()`]'s\ndocumentation for more examples.\n\nSee also: [`IntoIterator`].\n\n# Examples\n\nBasic usage:\n\n```rust\nlet five_fives = std::iter::repeat(5).take(5);\n\nlet v = Vec::from_iter(five_fives);\n\nasser'
25.889252 RECV on 0(out): 't_eq!(v, vec![5, 5, 5, 5, 5]);\n```\n\nUsing [`Iterator::collect()`] to implicitly use `FromIterator`:\n\n```rust\nlet five_fives = std::iter::repeat(5).take(5);\n\nlet v: Vec<i32> = five_fives.collect();\n\nassert_eq!(v, vec![5, 5, 5, 5, 5]);\n```\n\nImplementing `FromIterator` for your type:\n\n```rust\n// A sample collection, that's just a wrapper over Vec<T>\n#[derive(Debug)]\nstruct MyCollection(Vec<i32>);\n\n// Let's give it some methods so we can create one and add things\n// to it.\nimpl MyCollection {\n fn new() -> MyCollection {\n MyCollection(Vec::new())\n }\n\n fn add(&mut self, elem: i32) {\n self.0.push(elem);\n }\n}\n\n// and we'll implement FromIterator\nimpl FromIterator<i32> for MyCollection {\n fn from_iter<I: IntoIterator<Item=i32>>(iter: I) -> Self {\n let mut c = MyCollection::new();\n\n for i in iter {\n c.add(i);\n }\n\n c\n }\n}\n\n// Now we can make a new iterator...\nlet iter = (0..5).into_iter();\n\n// ... and make a MyCollection out of it\nlet c = MyCollection::from_iter(iter);\n\nassert_eq!(c.0, vec![0, 1, 2, 3, 4]);\n\n// collect works too!\n\nlet iter = (0..5).into_iter();\nlet c: MyCollection = iter.collect();\n\nassert_eq!(c.0, vec![0, 1, 2, 3, 4]);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"FromIterator","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"FromIterator"},"additionalTextEdits":[]},{"label":"ExactSizeIterator","kind":8,"documentation":{"kind":"markdown","value":"An iterator that knows its exact length.\n\nMany [`Iterator`]s don't know how many times they will iterate, but some do.\nIf an iterator knows how many times it can iterate, providing access to\nthat information can be useful. For example, if you want to iterate\nbackwards, a good start is to know where the end is.\n\nWhen implementing an `ExactSizeIterator`, you must also implement\n[`Iterator`]. When doing so, the implementation of [`Iterator::size_hint`]\n*must* return the exact size of the iterator.\n\nThe [`len`] method has a default implementation, so you usually shouldn't\nimplement it. However, you may be able to provide a more performant\nimplementation than the default, so overriding it in this case makes sense.\n\nNote that this trait is a safe trait and as such does *not* and *cannot*\nguarantee that the returned length is correct. This means that `unsafe`\ncode **must not** rely on the correctness of [`Iterator::size_hint`]. The\nunstable and unsafe [`TrustedLen`](super::marker::TrustedLen) trait gives\nthis additional guarantee.\n\n[`len`]: ExactSizeIterator::len\n\n# Examples\n\nBasic usage:\n\n```rust\n// a finite range knows exactly how many times it will iterate\nlet five = 0..5;\n\nassert_eq!(5, five.len());\n```\n\nIn the [module-level docs], we implemented an [`Iterator`], `Counter`.\nLet's implement `ExactSizeIterator` for it as well:\n\n[module-level docs]: crate::iter\n\n```rust\nimpl ExactSizeIterator for Counter {\n // We can easily calculate the remaining number of iterations.\n fn len(&self) -> usize {\n 5 - self.count\n }\n}\n\n// And now we can use it!\n\nlet counter = Counter::new();\n\nassert_eq!(5, counter.len());\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"ExactSizeIterator","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"ExactSizeIterator"},"additionalTextEdits":[]},{"label":"Ok(…)","kind":20,"detail":"Ok(T)","documentation":{"kind":"markdown","value":"Contains the success value"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Ok(…)","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Ok(${1:()})$0"},"additionalTextEdits":[]},{"label":"AsRef","kind":8,"documentation":{"kind":"markdown","value":"Used to do a cheap reference-to-reference conversion.\n\nThis trait is similar to [`AsMut`] which is used for converting between mutable references.'
25.889259 RECV on 0(out): '\nIf you need to do a costly conversion it is better to implement [`From`] with type\n`&T` or write a custom function.\n\n`AsRef` has the same signature as [`Borrow`], but [`Borrow`] is different in few aspects:\n\n- Unlike `AsRef`, [`Borrow`] has a blanket impl for any `T`, and can be used to accept either\n a reference or a value.\n- [`Borrow`] also requires that [`Hash`], [`Eq`] and [`Ord`] for borrowed value are\n equivalent to those of the owned value. For this reason, if you want to\n borrow only a single field of a struct you can implement `AsRef`, but not [`Borrow`].\n\n**Note: This trait must not fail**. If the conversion can fail, use a\ndedicated method which returns an [`Option<T>`] or a [`Result<T, E>`].\n\n# Generic Implementations\n\n- `AsRef` auto-dereferences if the inner type is a reference or a mutable\n reference (e.g.: `foo.as_ref()` will work the same if `foo` has type\n `&mut Foo` or `&&mut Foo`)\n\n# Examples\n\nBy using trait bounds we can accept arguments of different types as long as they can be\nconverted to the specified type `T`.\n\nFor example: By creating a generic function that takes an `AsRef<str>` we express that we\nwant to accept all references that can be converted to [`&str`] as an argument.\nSince both [`String`] and [`&str`] implement `AsRef<str>` we can accept both as input argument.\n\n[`&str`]: primitive@str\n[`Borrow`]: crate::borrow::Borrow\n[`Eq`]: crate::cmp::Eq\n[`Ord`]: crate::cmp::Ord\n[`String`]: ../../std/string/struct.String.html\n\n```rust\nfn is_hello<T: AsRef<str>>(s: T) {\n assert_eq!(\"hello\", s.as_ref());\n}\n\nlet s = \"hello\";\nis_hello(s);\n\nlet s = \"hello\".to_string();\nis_hello(s);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"AsRef","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"AsRef"},"additionalTextEdits":[]},{"label":"Iterator","kind":8,"documentation":{"kind":"markdown","value":"An interface for dealing with iterators.\n\nThis is the main iterator trait. For more about the concept of iterators\ngenerally, please see the [module-level documentation]. In particular, you\nmay want to know how to [implement `Iterator`][impl].\n\n[module-level documentation]: crate::iter\n[impl]: crate::iter#implementing-iterator"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Iterator","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Iterator"},"additionalTextEdits":[]},{"label":"Ord","kind":8,"documentation":{"kind":"markdown","value":"Trait for types that form a [total order](https://en.wikipedia.org/wiki/Total_order).\n\nImplementations must be consistent with the [`PartialOrd`] implementation, and ensure\n`max`, `min`, and `clamp` are consistent with `cmp`:\n\n- `partial_cmp(a, b) == Some(cmp(a, b))`.\n- `max(a, b) == max_by(a, b, cmp)` (ensured by the default implementation).\n- `min(a, b) == min_by(a, b, cmp)` (ensured by the default implementation).\n- For `a.clamp(min, max)`, see the [method docs](#method.clamp)\n (ensured by the default implementation).\n\nIt's easy to accidentally make `cmp` and `partial_cmp` disagree by\nderiving some of the traits and manually implementing others.\n\n## Corollaries\n\nFrom the above and the requirements of `PartialOrd`, it follows that `<` defines a strict total order.\nThis means that for all `a`, `b` and `c`:\n\n- exactly one of `a < b`, `a == b` or `a > b` is true; and\n- `<` is transitive: `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.\n\n## Derivable\n\nThis trait can be used with `#[derive]`.\n\nWhen `derive`d on structs, it will produce a\n[lexicographic](https://en.wikipedia.org/wiki/Lexicographic_order) ordering\nbased on the top-to-bottom declaration order of the struct's members.\n\nWhen `derive`d on enums, variants are ordered by their discriminants.\nBy default, the discriminant is smallest for variants at the top, and\nlargest for variants at the bottom. Here's an example:\n\n```rust\n#[derive(PartialEq, Eq, Partia'
25.889279 RECV on 0(out): 'lOrd, Ord)]\nenum E {\n Top,\n Bottom,\n}\n\nassert!(E::Top < E::Bottom);\n```\n\nHowever, manually setting the discriminants can override this default\nbehavior:\n\n```rust\n#[derive(PartialEq, Eq, PartialOrd, Ord)]\nenum E {\n Top = 2,\n Bottom = 1,\n}\n\nassert!(E::Bottom < E::Top);\n```\n\n## Lexicographical comparison\n\nLexicographical comparison is an operation with the following properties:\n - Two sequences are compared element by element.\n - The first mismatching element defines which sequence is lexicographically less or greater than the other.\n - If one sequence is a prefix of another, the shorter sequence is lexicographically less than the other.\n - If two sequence have equivalent elements and are of the same length, then the sequences are lexicographically equal.\n - An empty sequence is lexicographically less than any non-empty sequence.\n - Two empty sequences are lexicographically equal.\n\n## How can I implement `Ord`?\n\n`Ord` requires that the type also be [`PartialOrd`] and [`Eq`] (which requires [`PartialEq`]).\n\nThen you must define an implementation for [`cmp`]. You may find it useful to use\n[`cmp`] on your type's fields.\n\nHere's an example where you want to sort people by height only, disregarding `id`\nand `name`:\n\n```rust\nuse std::cmp::Ordering;\n\n#[derive(Eq)]\nstruct Person {\n id: u32,\n name: String,\n height: u32,\n}\n\nimpl Ord for Person {\n fn cmp(&self, other: &Self) -> Ordering {\n self.height.cmp(&other.height)\n }\n}\n\nimpl PartialOrd for Person {\n fn partial_cmp(&self, other: &Self) -> Option<Ordering> {\n Some(self.cmp(other))\n }\n}\n\nimpl PartialEq for Person {\n fn eq(&self, other: &Self) -> bool {\n self.height == other.height\n }\n}\n```\n\n[`cmp`]: Ord::cmp"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Ord","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Ord"},"additionalTextEdits":[]},{"label":"ToOwned","kind":8,"documentation":{"kind":"markdown","value":"A generalization of `Clone` to borrowed data.\n\nSome types make it possible to go from borrowed to owned, usually by\nimplementing the `Clone` trait. But `Clone` works only for going from `&T`\nto `T`. The `ToOwned` trait generalizes `Clone` to construct owned data\nfrom any borrow of a given type."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"ToOwned","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"ToOwned"},"additionalTextEdits":[]},{"label":"Vec","kind":22,"documentation":{"kind":"markdown","value":"A contiguous growable array type, written as `Vec<T>`, short for 'vector'.\n\n# Examples\n\n```rust\nlet mut vec = Vec::new();\nvec.push(1);\nvec.push(2);\n\nassert_eq!(vec.len(), 2);\nassert_eq!(vec[0], 1);\n\nassert_eq!(vec.pop(), Some(2));\nassert_eq!(vec.len(), 1);\n\nvec[0] = 7;\nassert_eq!(vec[0], 7);\n\nvec.extend([1, 2, 3].iter().copied());\n\nfor x in &vec {\n println!(\"{}\", x);\n}\nassert_eq!(vec, [7, 1, 2, 3]);\n```\n\nThe [`vec!`] macro is provided for convenient initialization:\n\n```rust\nlet mut vec1 = vec![1, 2, 3];\nvec1.push(4);\nlet vec2 = Vec::from([1, 2, 3, 4]);\nassert_eq!(vec1, vec2);\n```\n\nIt can also initialize each element of a `Vec<T>` with a given value.\nThis may be more efficient than performing allocation and initialization\nin separate steps, especially when initializing a vector of zeros:\n\n```rust\nlet vec = vec![0; 5];\nassert_eq!(vec, [0, 0, 0, 0, 0]);\n\n// The following is equivalent, but potentially slower:\nlet mut vec = Vec::with_capacity(5);\nvec.resize(5, 0);\nassert_eq!(vec, [0, 0, 0, 0, 0]);\n```\n\nFor more information, see\n[Capacity and Reallocation](#capacity-and-reallocation).\n\nUse a `Vec<T>` as an efficient stack:\n\n```rust\nlet mut stack = Vec::new();\n\nstack.push(1);\nstack.push(2);\nstack.push(3);\n\nwhile let Some(top) = stack.pop() {\n // Prints 3, 2, 1\n println!(\"{}\", top);\n}\n```\n\n# Indexing\n\nThe `Vec` type allows to '
25.889286 RECV on 0(out): 'access values by index, because it implements the\n[`Index`] trait. An example will be more explicit:\n\n```rust\nlet v = vec![0, 2, 4, 6];\nprintln!(\"{}\", v[1]); // it will display '2'\n```\n\nHowever be careful: if you try to access an index which isn't in the `Vec`,\nyour software will panic! You cannot do this:\n\n```rust\nlet v = vec![0, 2, 4, 6];\nprintln!(\"{}\", v[6]); // it will panic!\n```\n\nUse [`get`] and [`get_mut`] if you want to check whether the index is in\nthe `Vec`.\n\n# Slicing\n\nA `Vec` can be mutable. On the other hand, slices are read-only objects.\nTo get a [slice][prim@slice], use [`&`]. Example:\n\n```rust\nfn read_slice(slice: &[usize]) {\n // ...\n}\n\nlet v = vec![0, 1];\nread_slice(&v);\n\n// ... and that's all!\n// you can also do it like this:\nlet u: &[usize] = &v;\n// or like this:\nlet u: &[_] = &v;\n```\n\nIn Rust, it's more common to pass slices as arguments rather than vectors\nwhen you just want to provide read access. The same goes for [`String`] and\n[`&str`].\n\n# Capacity and reallocation\n\nThe capacity of a vector is the amount of space allocated for any future\nelements that will be added onto the vector. This is not to be confused with\nthe *length* of a vector, which specifies the number of actual elements\nwithin the vector. If a vector's length exceeds its capacity, its capacity\nwill automatically be increased, but its elements will have to be\nreallocated.\n\nFor example, a vector with capacity 10 and length 0 would be an empty vector\nwith space for 10 more elements. Pushing 10 or fewer elements onto the\nvector will not change its capacity or cause reallocation to occur. However,\nif the vector's length is increased to 11, it will have to reallocate, which\ncan be slow. For this reason, it is recommended to use [`Vec::with_capacity`]\nwhenever possible to specify how big the vector is expected to get.\n\n# Guarantees\n\nDue to its incredibly fundamental nature, `Vec` makes a lot of guarantees\nabout its design. This ensures that it's as low-overhead as possible in\nthe general case, and can be correctly manipulated in primitive ways\nby unsafe code. Note that these guarantees refer to an unqualified `Vec<T>`.\nIf additional type parameters are added (e.g., to support custom allocators),\noverriding their defaults may change the behavior.\n\nMost fundamentally, `Vec` is and always will be a (pointer, capacity, length)\ntriplet. No more, no less. The order of these fields is completely\nunspecified, and you should use the appropriate methods to modify these.\nThe pointer will never be null, so this type is null-pointer-optimized.\n\nHowever, the pointer might not actually point to allocated memory. In particular,\nif you construct a `Vec` with capacity 0 via [`Vec::new`], [`vec![]`][`vec!`],\n[`Vec::with_capacity(0)`][`Vec::with_capacity`], or by calling [`shrink_to_fit`]\non an empty Vec, it will not allocate memory. Similarly, if you store zero-sized\ntypes inside a `Vec`, it will not allocate space for them. *Note that in this case\nthe `Vec` might not report a [`capacity`] of 0*. `Vec` will allocate if and only\nif <code>[mem::size_of::\\<T>]\\() * [capacity]\\() > 0</code>. In general, `Vec`'s allocation\ndetails are very subtle --- if you intend to allocate memory using a `Vec`\nand use it for something else (either to pass to unsafe code, or to build your\nown memory-backed collection), be sure to deallocate this memory by using\n`from_raw_parts` to recover the `Vec` and then dropping it.\n\nIf a `Vec` *has* allocated memory, then the memory it points to is on the heap\n(as defined by the allocator Rust is configured to use by default), and its\npointer points to [`len`] initialized, contiguous elements in order (what\nyou would see if you coerced it to a slice), followed by <code>[capacity] - [len]</code>\nlogically uninitialized, contiguous elements.\n\nA vector containing the elements `'a'` and `'b'` with capacity 4 can be\nvisualized as below. The top part is the `Vec` struct, it contains a\npointer to the head of the allocation in the heap, length and'
25.889306 RECV on 0(out): ' capacity.\nThe bottom part is the allocation on the heap, a contiguous memory block.\n\n```text\n ptr len capacity\n +--------+--------+--------+\n | 0x0123 | 2 | 4 |\n +--------+--------+--------+\n |\n v\nHeap +--------+--------+--------+--------+\n | 'a' | 'b' | uninit | uninit |\n +--------+--------+--------+--------+\n```\n\n- **uninit** represents memory that is not initialized, see [`MaybeUninit`].\n- Note: the ABI is not stable and `Vec` makes no guarantees about its memory\n layout (including the order of fields).\n\n`Vec` will never perform a \"small optimization\" where elements are actually\nstored on the stack for two reasons:\n\n* It would make it more difficult for unsafe code to correctly manipulate\n a `Vec`. The contents of a `Vec` wouldn't have a stable address if it were\n only moved, and it would be more difficult to determine if a `Vec` had\n actually allocated memory.\n\n* It would penalize the general case, incurring an additional branch\n on every access.\n\n`Vec` will never automatically shrink itself, even if completely empty. This\nensures no unnecessary allocations or deallocations occur. Emptying a `Vec`\nand then filling it back up to the same [`len`] should incur no calls to\nthe allocator. If you wish to free up unused memory, use\n[`shrink_to_fit`] or [`shrink_to`].\n\n[`push`] and [`insert`] will never (re)allocate if the reported capacity is\nsufficient. [`push`] and [`insert`] *will* (re)allocate if\n<code>[len] == [capacity]</code>. That is, the reported capacity is completely\naccurate, and can be relied on. It can even be used to manually free the memory\nallocated by a `Vec` if desired. Bulk insertion methods *may* reallocate, even\nwhen not necessary.\n\n`Vec` does not guarantee any particular growth strategy when reallocating\nwhen full, nor when [`reserve`] is called. The current strategy is basic\nand it may prove desirable to use a non-constant growth factor. Whatever\nstrategy is used will of course guarantee *O*(1) amortized [`push`].\n\n`vec![x; n]`, `vec![a, b, c, d]`, and\n[`Vec::with_capacity(n)`][`Vec::with_capacity`], will all produce a `Vec`\nwith exactly the requested capacity. If <code>[len] == [capacity]</code>,\n(as is the case for the [`vec!`] macro), then a `Vec<T>` can be converted to\nand from a [`Box<[T]>`][owned slice] without reallocating or moving the elements.\n\n`Vec` will not specifically overwrite any data that is removed from it,\nbut also won't specifically preserve it. Its uninitialized memory is\nscratch space that it may use however it wants. It will generally just do\nwhatever is most efficient or otherwise easy to implement. Do not rely on\nremoved data to be erased for security purposes. Even if you drop a `Vec`, its\nbuffer may simply be reused by another allocation. Even if you zero a `Vec`'s memory\nfirst, that might not actually happen because the optimizer does not consider\nthis a side-effect that must be preserved. There is one case which we will\nnot break, however: using `unsafe` code to write to the excess capacity,\nand then increasing the length to match, is always valid.\n\nCurrently, `Vec` does not guarantee the order in which elements are dropped.\nThe order has changed in the past and may change again.\n\n[`get`]: ../../std/vec/struct.Vec.html#method.get\n[`get_mut`]: ../../std/vec/struct.Vec.html#method.get_mut\n[`String`]: crate::string::String\n[`&str`]: type@str\n[`shrink_to_fit`]: Vec::shrink_to_fit\n[`shrink_to`]: Vec::shrink_to\n[capacity]: Vec::capacity\n[`capacity`]: Vec::capacity\n[mem::size_of::\\<T>]: core::mem::size_of\n[len]: Vec::len\n[`len`]: Vec::len\n[`push`]: Vec::push\n[`insert`]: Vec::insert\n[`reserve`]: Vec::reserve\n[`MaybeUninit`]: core::mem::MaybeUninit\n[owned slice]: Box"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Vec","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Vec"},"additionalTextEdits":[]},{"label":"Fn","kind":8,"documentat'
25.889313 RECV on 0(out): 'ion":{"kind":"markdown","value":"The version of the call operator that takes an immutable receiver.\n\nInstances of `Fn` can be called repeatedly without mutating state.\n\n*This trait (`Fn`) is not to be confused with [function pointers]\n(`fn`).*\n\n`Fn` is implemented automatically by closures which only take immutable\nreferences to captured variables or don't capture anything at all, as well\nas (safe) [function pointers] (with some caveats, see their documentation\nfor more details). Additionally, for any type `F` that implements `Fn`, `&F`\nimplements `Fn`, too.\n\nSince both [`FnMut`] and [`FnOnce`] are supertraits of `Fn`, any\ninstance of `Fn` can be used as a parameter where a [`FnMut`] or [`FnOnce`]\nis expected.\n\nUse `Fn` as a bound when you want to accept a parameter of function-like\ntype and need to call it repeatedly and without mutating state (e.g., when\ncalling it concurrently). If you do not need such strict requirements, use\n[`FnMut`] or [`FnOnce`] as bounds.\n\nSee the [chapter on closures in *The Rust Programming Language*][book] for\nsome more information on this topic.\n\nAlso of note is the special syntax for `Fn` traits (e.g.\n`Fn(usize, bool) -> usize`). Those interested in the technical details of\nthis can refer to [the relevant section in the *Rustonomicon*][nomicon].\n\n[book]: ../../book/ch13-01-closures.html\n[function pointers]: fn\n[nomicon]: ../../nomicon/hrtb.html\n\n# Examples\n\n## Calling a closure\n\n```rust\nlet square = |x| x * x;\nassert_eq!(square(5), 25);\n```\n\n## Using a `Fn` parameter\n\n```rust\nfn call_with_one<F>(func: F) -> usize\n where F: Fn(usize) -> usize {\n func(1)\n}\n\nlet double = |x| x * 2;\nassert_eq!(call_with_one(double), 2);\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Fn","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Fn"},"additionalTextEdits":[]},{"label":"IntoIterator","kind":8,"documentation":{"kind":"markdown","value":"Conversion into an [`Iterator`].\n\nBy implementing `IntoIterator` for a type, you define how it will be\nconverted to an iterator. This is common for types which describe a\ncollection of some kind.\n\nOne benefit of implementing `IntoIterator` is that your type will [work\nwith Rust's `for` loop syntax](crate::iter#for-loops-and-intoiterator).\n\nSee also: [`FromIterator`].\n\n# Examples\n\nBasic usage:\n\n```rust\nlet v = [1, 2, 3];\nlet mut iter = v.into_iter();\n\nassert_eq!(Some(1), iter.next());\nassert_eq!(Some(2), iter.next());\nassert_eq!(Some(3), iter.next());\nassert_eq!(None, iter.next());\n```\nImplementing `IntoIterator` for your type:\n\n```rust\n// A sample collection, that's just a wrapper over Vec<T>\n#[derive(Debug)]\nstruct MyCollection(Vec<i32>);\n\n// Let's give it some methods so we can create one and add things\n// to it.\nimpl MyCollection {\n fn new() -> MyCollection {\n MyCollection(Vec::new())\n }\n\n fn add(&mut self, elem: i32) {\n self.0.push(elem);\n }\n}\n\n// and we'll implement IntoIterator\nimpl IntoIterator for MyCollection {\n type Item = i32;\n type IntoIter = std::vec::IntoIter<Self::Item>;\n\n fn into_iter(self) -> Self::IntoIter {\n self.0.into_iter()\n }\n}\n\n// Now we can make a new collection...\nlet mut c = MyCollection::new();\n\n// ... add some stuff to it ...\nc.add(0);\nc.add(1);\nc.add(2);\n\n// ... and then turn it into an Iterator:\nfor (i, n) in c.into_iter().enumerate() {\n assert_eq!(i as i32, n);\n}\n```\n\nIt is common to use `IntoIterator` as a trait bound. This allows\nthe input collection type to change, so long as it is still an\niterator. Additional bounds can be specified by restricting on\n`Item`:\n\n```rust\nfn collect_as_strings<T>(collection: T) -> Vec<String>\nwhere\n T: IntoIterator,\n T::Item: std::fmt::Debug,\n{\n collection\n .into_iter()\n .map(|item| format!(\"{:?}\", item))\n .collect()\n}\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"IntoIterator","textE'
25.889334 RECV on 0(out): 'dit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"IntoIterator"},"additionalTextEdits":[]},{"label":"Default","kind":8,"documentation":{"kind":"markdown","value":"A trait for giving a type a useful default value.\n\nSometimes, you want to fall back to some kind of default value, and\ndon't particularly care what it is. This comes up often with `struct`s\nthat define a set of options:\n\n```rust\nstruct SomeOptions {\n foo: i32,\n bar: f32,\n}\n```\n\nHow can we define some default values? You can use `Default`:\n\n```rust\n#[derive(Default)]\nstruct SomeOptions {\n foo: i32,\n bar: f32,\n}\n\nfn main() {\n let options: SomeOptions = Default::default();\n}\n```\n\nNow, you get all of the default values. Rust implements `Default` for various primitives types.\n\nIf you want to override a particular option, but still retain the other defaults:\n\n```rust\nfn main() {\n let options = SomeOptions { foo: 42, ..Default::default() };\n}\n```\n\n## Derivable\n\nThis trait can be used with `#[derive]` if all of the type's fields implement\n`Default`. When `derive`d, it will use the default value for each field's type.\n\n## How can I implement `Default`?\n\nProvide an implementation for the `default()` method that returns the value of\nyour type that should be the default:\n\n```rust\nenum Kind {\n A,\n B,\n C,\n}\n\nimpl Default for Kind {\n fn default() -> Self { Kind::A }\n}\n```\n\n# Examples\n\n```rust\n#[derive(Default)]\nstruct SomeOptions {\n foo: i32,\n bar: f32,\n}\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Default","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Default"},"additionalTextEdits":[]},{"label":"Sized","kind":8,"documentation":{"kind":"markdown","value":"Types with a constant size known at compile time.\n\nAll type parameters have an implicit bound of `Sized`. The special syntax\n`?Sized` can be used to remove this bound if it's not appropriate.\n\n```rust\nstruct Foo<T>(T);\nstruct Bar<T: ?Sized>(T);\n\n// struct FooUse(Foo<[i32]>); // error: Sized is not implemented for [i32]\nstruct BarUse(Bar<[i32]>); // OK\n```\n\nThe one exception is the implicit `Self` type of a trait. A trait does not\nhave an implicit `Sized` bound as this is incompatible with [trait object]s\nwhere, by definition, the trait needs to work with all possible implementors,\nand thus could be any size.\n\nAlthough Rust will let you bind `Sized` to a trait, you won't\nbe able to use it to form a trait object later:\n\n```rust\ntrait Foo { }\ntrait Bar: Sized { }\n\nstruct Impl;\nimpl Foo for Impl { }\nimpl Bar for Impl { }\n\nlet x: &dyn Foo = &Impl; // OK\n// let y: &dyn Bar = &Impl; // error: the trait `Bar` cannot\n // be made into an object\n```\n\n[trait object]: ../../book/ch17-02-trait-objects.html"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Sized","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Sized"},"additionalTextEdits":[]},{"label":"Sync","kind":8,"documentation":{"kind":"markdown","value":"Types for which it is safe to share references between threads.\n\nThis trait is automatically implemented when the compiler determines\nit's appropriate.\n\nThe precise definition is: a type `T` is [`Sync`] if and only if `&T` is\n[`Send`]. In other words, if there is no possibility of\n[undefined behavior][ub] (including data races) when passing\n`&T` references between threads.\n\nAs one would expect, primitive types like [`u8`] and [`f64`]\nare all [`Sync`], and so are simple aggregate types containing them,\nlike tuples, structs and enums. More examples of basic [`Sync`]\ntypes include \"immutable\" types like `&T`, and those with simple\ninherited mutability, such as [`Box<T>`][box], [`Vec<T>`][vec] and\nmost other collection types. (Generic parameters need to be [`Sync`]\nfor their container to be [`Sync`].)\n\nA somewhat surprising consequence of the definition is '
25.889345 RECV on 0(out): 'that `&mut T`\nis `Sync` (if `T` is `Sync`) even though it seems like that might\nprovide unsynchronized mutation. The trick is that a mutable\nreference behind a shared reference (that is, `& &mut T`)\nbecomes read-only, as if it were a `& &T`. Hence there is no risk\nof a data race.\n\nTypes that are not `Sync` are those that have \"interior\nmutability\" in a non-thread-safe form, such as [`Cell`][cell]\nand [`RefCell`][refcell]. These types allow for mutation of\ntheir contents even through an immutable, shared reference. For\nexample the `set` method on [`Cell<T>`][cell] takes `&self`, so it requires\nonly a shared reference [`&Cell<T>`][cell]. The method performs no\nsynchronization, thus [`Cell`][cell] cannot be `Sync`.\n\nAnother example of a non-`Sync` type is the reference-counting\npointer [`Rc`][rc]. Given any reference [`&Rc<T>`][rc], you can clone\na new [`Rc<T>`][rc], modifying the reference counts in a non-atomic way.\n\nFor cases when one does need thread-safe interior mutability,\nRust provides [atomic data types], as well as explicit locking via\n[`sync::Mutex`][mutex] and [`sync::RwLock`][rwlock]. These types\nensure that any mutation cannot cause data races, hence the types\nare `Sync`. Likewise, [`sync::Arc`][arc] provides a thread-safe\nanalogue of [`Rc`][rc].\n\nAny types with interior mutability must also use the\n[`cell::UnsafeCell`][unsafecell] wrapper around the value(s) which\ncan be mutated through a shared reference. Failing to doing this is\n[undefined behavior][ub]. For example, [`transmute`][transmute]-ing\nfrom `&T` to `&mut T` is invalid.\n\nSee [the Nomicon][nomicon-send-and-sync] for more details about `Sync`.\n\n[box]: ../../std/boxed/struct.Box.html\n[vec]: ../../std/vec/struct.Vec.html\n[cell]: crate::cell::Cell\n[refcell]: crate::cell::RefCell\n[rc]: ../../std/rc/struct.Rc.html\n[arc]: ../../std/sync/struct.Arc.html\n[atomic data types]: crate::sync::atomic\n[mutex]: ../../std/sync/struct.Mutex.html\n[rwlock]: ../../std/sync/struct.RwLock.html\n[unsafecell]: crate::cell::UnsafeCell\n[ub]: ../../reference/behavior-considered-undefined.html\n[transmute]: crate::mem::transmute\n[nomicon-send-and-sync]: ../../nomicon/send-and-sync.html"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Sync","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Sync"},"additionalTextEdits":[]},{"label":"DoubleEndedIterator","kind":8,"documentation":{"kind":"markdown","value":"An iterator able to yield elements from both ends.\n\nSomething that implements `DoubleEndedIterator` has one extra capability\nover something that implements [`Iterator`]: the ability to also take\n`Item`s from the back, as well as the front.\n\nIt is important to note that both back and forth work on the same range,\nand do not cross: iteration is over when they meet in the middle.\n\nIn a similar fashion to the [`Iterator`] protocol, once a\n`DoubleEndedIterator` returns [`None`] from a [`next_back()`], calling it\nagain may or may not ever return [`Some`] again. [`next()`] and\n[`next_back()`] are interchangeable for this purpose.\n\n[`next_back()`]: DoubleEndedIterator::next_back\n[`next()`]: Iterator::next\n\n# Examples\n\nBasic usage:\n\n```rust\nlet numbers = vec![1, 2, 3, 4, 5, 6];\n\nlet mut iter = numbers.iter();\n\nassert_eq!(Some(&1), iter.next());\nassert_eq!(Some(&6), iter.next_back());\nassert_eq!(Some(&5), iter.next_back());\nassert_eq!(Some(&2), iter.next());\nassert_eq!(Some(&3), iter.next());\nassert_eq!(Some(&4), iter.next());\nassert_eq!(None, iter.next());\nassert_eq!(None, iter.next_back());\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"DoubleEndedIterator","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"DoubleEndedIterator"},"additionalTextEdits":[]},{"label":"Some(…)","kind":20,"detail":"Some(T)","documentation":{"kind":"markdown","value":"Some value of type `T`."},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Some(…)","insertTe'
25.889366 RECV on 0(out): 'xtFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Some(${1:()})$0"},"additionalTextEdits":[]},{"label":"Err(…)","kind":20,"detail":"Err(E)","documentation":{"kind":"markdown","value":"Contains the error value"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Err(…)","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Err(${1:()})$0"},"additionalTextEdits":[]},{"label":"FnOnce","kind":8,"documentation":{"kind":"markdown","value":"The version of the call operator that takes a by-value receiver.\n\nInstances of `FnOnce` can be called, but might not be callable multiple\ntimes. Because of this, if the only thing known about a type is that it\nimplements `FnOnce`, it can only be called once.\n\n`FnOnce` is implemented automatically by closures that might consume captured\nvariables, as well as all types that implement [`FnMut`], e.g., (safe)\n[function pointers] (since `FnOnce` is a supertrait of [`FnMut`]).\n\nSince both [`Fn`] and [`FnMut`] are subtraits of `FnOnce`, any instance of\n[`Fn`] or [`FnMut`] can be used where a `FnOnce` is expected.\n\nUse `FnOnce` as a bound when you want to accept a parameter of function-like\ntype and only need to call it once. If you need to call the parameter\nrepeatedly, use [`FnMut`] as a bound; if you also need it to not mutate\nstate, use [`Fn`].\n\nSee the [chapter on closures in *The Rust Programming Language*][book] for\nsome more information on this topic.\n\nAlso of note is the special syntax for `Fn` traits (e.g.\n`Fn(usize, bool) -> usize`). Those interested in the technical details of\nthis can refer to [the relevant section in the *Rustonomicon*][nomicon].\n\n[book]: ../../book/ch13-01-closures.html\n[function pointers]: fn\n[nomicon]: ../../nomicon/hrtb.html\n\n# Examples\n\n## Using a `FnOnce` parameter\n\n```rust\nfn consume_with_relish<F>(func: F)\n where F: FnOnce() -> String\n{\n // `func` consumes its captured variables, so it cannot be run more\n // than once.\n println!(\"Consumed: {}\", func());\n\n println!(\"Delicious!\");\n\n // Attempting to invoke `func()` again will throw a `use of moved\n // value` error for `func`.\n}\n\nlet x = String::from(\"x\");\nlet consume_and_return_x = move || x;\nconsume_with_relish(consume_and_return_x);\n\n// `consume_and_return_x` can no longer be invoked at this point\n```"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"FnOnce","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"FnOnce"},"additionalTextEdits":[]},{"label":"Send","kind":8,"documentation":{"kind":"markdown","value":"Types that can be transferred across thread boundaries.\n\nThis trait is automatically implemented when the compiler determines it's\nappropriate.\n\nAn example of a non-`Send` type is the reference-counting pointer\n[`rc::Rc`][`Rc`]. If two threads attempt to clone [`Rc`]s that point to the same\nreference-counted value, they might try to update the reference count at the\nsame time, which is [undefined behavior][ub] because [`Rc`] doesn't use atomic\noperations. Its cousin [`sync::Arc`][arc] does use atomic operations (incurring\nsome overhead) and thus is `Send`.\n\nSee [the Nomicon](../../nomicon/send-and-sync.html) for more details.\n\n[`Rc`]: ../../std/rc/struct.Rc.html\n[arc]: ../../std/sync/struct.Arc.html\n[ub]: ../../reference/behavior-considered-undefined.html"},"deprecated":false,"preselect":true,"sortText":"fffffff1","filterText":"Send","textEdit":{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"newText":"Send"},"additionalTextEdits":[]}]}}'
25.889372 : looking for messages on channels
25.889392 on 0: still waiting on incomplete message
25.889409 : SafeState: back to waiting, triggering SafeStateAgain
25.889424 on 0: still waiting on incomplete message
25.889438 on 0: still waiting on incomplete message
25.979881 on 0: timed out
25.979927 ERR on 0: Decoding failed - discarding input
26.147193 : looking for messages on channels
26.147276 on 0: Incomplete message (126 bytes) - wait 100 msec for more
26.147304 : SafeState: back to waiting, triggering SafeStateAgain
26.147323 : looking for messages on channels
26.147340 on 0: still waiting on incomplete message
26.147359 : SafeState: back to waiting, triggering SafeStateAgain
26.147378 on 0: still waiting on incomplete message
26.147396 on 0: still waiting on incomplete message
27.438976 : raw key input: ""
27.439098 : looking for messages on channels
27.439125 on 0: timed out
27.439140 ERR on 0: Decoding failed - discarding input
27.439157 : SafeState: back to waiting, triggering SafeStateAgain
27.449288 : looking for messages on channels
27.449334 on 0: Invoking channel callback <SNR>172_native_out_cb
27.449523 on 0: Invoking channel callback <SNR>172_native_out_cb
27.456775 on 0: Invoking channel callback <SNR>172_native_out_cb
27.458620 on 0: Invoking channel callback <SNR>172_native_out_cb
27.460189 on 0: Invoking channel callback <SNR>172_native_out_cb
27.461290 on 0: Invoking channel callback <SNR>172_native_out_cb
27.462733 on 0: Invoking channel callback <SNR>172_native_out_cb
27.464329 on 0: Invoking channel callback <SNR>172_native_out_cb
27.465572 on 0: Invoking channel callback <SNR>172_native_out_cb
27.466595 on 0: Invoking channel callback <SNR>172_native_out_cb
27.467578 on 0: Invoking channel callback <SNR>172_native_out_cb
27.468560 on 0: Invoking channel callback <SNR>172_native_out_cb
27.469565 on 0: Invoking channel callback <SNR>172_native_out_cb
27.470572 on 0: Invoking channel callback <SNR>172_native_out_cb
27.471587 on 0: Invoking channel callback <SNR>172_native_out_cb
27.472626 on 0: Invoking channel callback <SNR>172_native_out_cb
27.473686 on 0: Invoking channel callback <SNR>172_native_out_cb
27.474735 on 0: Invoking channel callback <SNR>172_native_out_cb
27.477030 on 0: Invoking channel callback <SNR>172_native_out_cb
27.478114 on 0: Invoking channel callback <SNR>172_native_out_cb
27.479171 on 0: Invoking channel callback <SNR>172_native_out_cb
27.480167 on 0: Invoking channel callback <SNR>172_native_out_cb
27.481221 on 0: Invoking channel callback <SNR>172_native_out_cb
27.482242 on 0: Invoking channel callback <SNR>172_native_out_cb
27.483264 on 0: Invoking channel callback <SNR>172_native_out_cb
27.484261 on 0: Invoking one-time callback <SNR>172_on_response_native
27.489701 on 0: Invoking channel callback <SNR>172_native_out_cb
27.490832 on 0: Invoking channel callback <SNR>172_native_out_cb
27.491935 on 0: Invoking channel callback <SNR>172_native_out_cb
27.492934 on 0: Incomplete message (4096 bytes) - wait 100 msec for more
27.492986 : SafeState: back to waiting, triggering SafeStateAgain
27.493003 on 0: still waiting on incomplete message
27.493015 on 0: still waiting on incomplete message
27.740338 : looking for messages on channels
27.740406 on 0: timed out
27.740426 ERR on 0: Decoding failed - discarding input
27.740446 : SafeState: back to waiting, triggering SafeStateAgain
27.740461 : looking for messages on channels
27.740481 on 0: Incomplete message (4096 bytes) - wait 100 msec for more
27.740499 : SafeState: back to waiting, triggering SafeStateAgain
27.740519 on 0: still waiting on incomplete message
27.740541 on 0: still waiting on incomplete message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment