Skip to content

Instantly share code, notes, and snippets.

@prabirshrestha
Created February 7, 2021 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prabirshrestha/93efe102437180132438a715a64dd7e9 to your computer and use it in GitHub Desktop.
Save prabirshrestha/93efe102437180132438a715a64dd7e9 to your computer and use it in GitHub Desktop.
rust analyzer $/progress notifications
```
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":0,"message":"1/909 (alloc)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":0,"message":"3/909 (panic_unwind)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":0,"message":"4/909 (profiler_builtins)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":0,"message":"5/909 (proc_macro)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":0,"message":"6/909 (term)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":0,"message":"7/909 (test)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":1,"message":"10/909 (std)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":1,"message":"11/909 (base64)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":1,"message":"12/909 (futures_core)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":1,"message":"13/909 (futures_sink)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":1,"message":"14/909 (futures_channel)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":1,"message":"15/909 (once_cell)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":1,"message":"16/909 (futures_task)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":1,"message":"17/909 (futures_io)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":1,"message":"18/909 (proc_macro_hack)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":2,"message":"22/909 (syn)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":2,"message":"23/909 (futures_macro)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":2,"message":"24/909 (memchr)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":2,"message":"25/909 (pin_project_lite)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":2,"message":"26/909 (pin_utils)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":3,"message":"28/909 (slab)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":3,"message":"29/909 (futures_util)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":3,"message":"30/909 (futures_executor)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":3,"message":"31/909 (futures)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":3,"message":"33/909 (once_cell)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":3,"message":"36/909 (getrandom)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":4,"message":"37/909 (version_check)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":4,"message":"38/909 (ahash)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":4,"message":"40/909 (num_traits)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":4,"message":"41/909 (atoi)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":4,"message":"42/909 (bitflags)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":4,"message":"44/909 (bytes)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":5,"message":"47/909 (serde)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":5,"message":"48/909 (time)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":5,"message":"49/909 (chrono)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":5,"message":"50/909 (build_const)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":5,"message":"51/909 (crc)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":5,"message":"54/909 (crossbeam_channel)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":6,"message":"55/909 (crossbeam_queue)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":6,"message":"56/909 (either)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":6,"message":"57/909 (ahash)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":6,"message":"58/909 (hashbrown)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":6,"message":"59/909 (hashlink)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":6,"message":"60/909 (hex)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":6,"message":"61/909 (itoa)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":6,"message":"62/909 (cc)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":6,"message":"63/909 (pkg_config)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":7,"message":"64/909 (libsqlite3_sys)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":7,"message":"69/909 (instant)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":7,"message":"70/909 (scopeguard)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":7,"message":"71/909 (lock_api)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":7,"message":"72/909 (smallvec)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":8,"message":"73/909 (parking_lot_core)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":8,"message":"74/909 (parking_lot)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":8,"message":"75/909 (percent_encoding)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":8,"message":"78/909 (block_buffer)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":8,"message":"79/909 (cpuid_bool)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":8,"message":"80/909 (digest)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":9,"message":"82/909 (sha2)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":9,"message":"84/909 (funty)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":9,"message":"85/909 (radium)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":9,"message":"86/909 (tap)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":9,"message":"87/909 (wyz)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":9,"message":"88/909 (bitvec)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":10,"message":"93/909 (lexical_core)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":10,"message":"94/909 (nom)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":10,"message":"95/909 (aho_corasick)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":10,"message":"96/909 (regex_syntax)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":10,"message":"97/909 (thread_local)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":10,"message":"98/909 (regex)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":10,"message":"99/909 (unicode_categories)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":11,"message":"100/909 (sqlformat)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":11,"message":"107/909 (fastrand)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":14,"message":"129/909 (openssl_sys)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":14,"message":"130/909 (openssl)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:29 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":14,"message":"132/909 (native_tls)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":14,"message":"133/909 (thiserror_impl)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":14,"message":"134/909 (thiserror)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":14,"message":"136/909 (form_urlencoded)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":15,"message":"137/909 (unicode_bidi)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":15,"message":"139/909 (tinyvec)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":15,"message":"140/909 (unicode_normalization)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":15,"message":"141/909 (idna)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":15,"message":"142/909 (url)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":15,"message":"143/909 (async_native_tls)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":15,"message":"145/909 (stringprep)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":16,"message":"146/909 (whoami)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":16,"message":"147/909 (sqlx_core)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":16,"message":"148/909 (cargo_platform)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":16,"message":"149/909 (ucd_trie)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":16,"message":"150/909 (pest)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":16,"message":"151/909 (semver_parser)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":16,"message":"152/909 (semver)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":16,"message":"153/909 (serde_json)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":16,"message":"154/909 (cargo_metadata)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":17,"message":"156/909 (unicode_segmentation)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":17,"message":"157/909 (heck)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":17,"message":"158/909 (sqlx_macros)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":17,"message":"160/909 (sqlx)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":17,"message":"161/909 (crossbeam_utils)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":17,"message":"162/909 (maybe_uninit)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":18,"message":"167/909 (pin_project_internal)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":18,"message":"168/909 (pin_project)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":19,"message":"174/909 (thiserror)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":19,"message":"176/909 (crossbeam_channel)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":19,"message":"177/909 (subtle)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":19,"message":"178/909 (crypto_mac)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":19,"message":"179/909 (hmac)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":19,"message":"180/909 (getrandom)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":19,"message":"181/909 (ppv_lite86)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":20,"message":"182/909 (rand_core)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":20,"message":"183/909 (rand_chacha)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":20,"message":"184/909 (rand)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":20,"message":"185/909 (rand)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":22,"message":"205/909 (time_macros_impl)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":22,"message":"207/909 (time)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":22,"message":"208/909 (cookie)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":22,"message":"209/909 (infer)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":23,"message":"210/909 (data_encoding)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":23,"message":"211/909 (serde_qs)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":23,"message":"212/909 (serde_urlencoded)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":23,"message":"213/909 (http_types)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":23,"message":"214/909 (httparse)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":23,"message":"215/909 (async_h1)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":23,"message":"217/909 (bincode)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":24,"message":"219/909 (constant_time_eq)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":24,"message":"220/909 (blake3)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":24,"message":"221/909 (async_session)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":24,"message":"223/909 (async_sse)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":24,"message":"224/909 (femme)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":24,"message":"226/909 (route_recognizer)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":24,"message":"227/909 (tide)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":25,"message":"228/909 (tide)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":26,"message":"243/909 (futures)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":27,"message":"246/909 (arrayvec)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":27,"message":"247/909 (cc)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":27,"message":"251/909 (async_io)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":27,"message":"252/909 (crossbeam_channel)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":28,"message":"255/909 (tide)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":28,"message":"256/909 (async_std)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":28,"message":"262/909 (serde_urlencoded)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":29,"message":"264/909 (futures)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":29,"message":"266/909 (uuid)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":29,"message":"267/909 (objstor)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":29,"message":"268/909 (sqlx)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":29,"message":"270/909 (futures)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":30,"message":"273/909 (cargo_metadata)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":30,"message":"274/909 (pin_project_lite)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":30,"message":"276/909 (crc)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":30,"message":"278/909 (radium)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":30,"message":"279/909 (tide)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":30,"message":"281/909 (crossbeam_utils)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":31,"message":"282/909 (tinyvec)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":31,"message":"285/909 (serde_qs)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":32,"message":"293/909 (anyhow)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":32,"message":"296/909 (pin_project_lite)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":32,"message":"297/909 (syn)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":32,"message":"298/909 (async_h1)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":32,"message":"299/909 (hex)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":33,"message":"303/909 (crossbeam_utils)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":33,"message":"304/909 (async_std)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":33,"message":"305/909 (dotenv)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":33,"message":"307/909 (serde_qs)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":33,"message":"308/909 (vec_arena)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":34,"message":"313/909 (aes_gcm)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":34,"message":"315/909 (pest)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":34,"message":"316/909 (standback)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":35,"message":"320/909 (pin_project_lite)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":35,"message":"321/909 (syn)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":35,"message":"322/909 (async_h1)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":35,"message":"323/909 (cookie)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":35,"message":"327/909 (regex)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":36,"message":"330/909 (memchr)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":36,"message":"331/909 (serde_json)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":36,"message":"333/909 (num_integer)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":91,"message":"832/909 (httparse)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":91,"message":"834/909 (tide)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":92,"message":"837/909 (semver_parser)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":92,"message":"842/909 (futures)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":92,"message":"843/909 (sqlx)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":93,"message":"846/909 (futures_executor)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":93,"message":"847/909 (pin_project)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":93,"message":"849/909 (async_executor)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":93,"message":"851/909 (thiserror)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":93,"message":"853/909 (crossbeam_channel)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":94,"message":"856/909 (tide)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":94,"message":"859/909 (semver)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":94,"message":"862/909 (nom)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":94,"message":"863/909 (signal_hook)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":95,"message":"864/909 (base64)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":95,"message":"867/909 (ahash)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":95,"message":"868/909 (bytes)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":95,"message":"871/909 (async_channel)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":96,"message":"873/909 (ghash)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":96,"message":"874/909 (polyval)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":96,"message":"875/909 (thiserror)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":96,"message":"877/909 (http_types)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":96,"message":"878/909 (regex)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":96,"message":"879/909 (tide)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":97,"message":"882/909 (libsqlite3_sys)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":97,"message":"884/909 (async_task)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":97,"message":"885/909 (nom)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":97,"message":"886/909 (signal_hook)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":97,"message":"889/909 (once_cell)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":97,"message":"890/909 (sqlx)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":98,"message":"892/909 (futures_channel)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":98,"message":"896/909 (getrandom)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":98,"message":"898/909 (thiserror)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":98,"message":"899/909 (async_lock)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":99,"message":"902/909 (async_std)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":99,"message":"905/909 (ryu)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":99,"message":"906/909 (async_task)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":99,"message":"907/909 (nom)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"percentage":99,"message":"908/909 (sha2)","kind":"report"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"$/progress","jsonrpc":"2.0","params":{"token":"rustAnalyzer/indexing","value":{"kind":"end"}}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"method":"textDocument/publishDiagnostics","jsonrpc":"2.0","params":{"uri":"file:///home/prabirshrestha/code/objstor/src/main.rs","diagnostics":[{"source":"rust-analyzer","range":{"end":{"character":5,"line":32},"start":{"character":5,"line":32}},"message":"Syntax Error: expected SEMICOLON","severity":1}],"version":2}}}]
Sun 07 Feb 2021 05:23:30 PM UTC:["<---",1,"rust-analyzer",{"response":{"id":6,"jsonrpc":"2.0","result":{"isIncomplete":true,"items":[{"label":"fn","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"fn $0() {}"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"fn"},{"label":"use","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"use "},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"use"},{"label":"impl","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"impl $0 {}"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"impl"},{"label":"trait","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"trait $0 {}"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"trait"},{"label":"match","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"match $0 {}"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"match"},{"label":"while","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"while $0 {}"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"while"},{"label":"loop","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"loop {$0}"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"loop"},{"label":"if","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"if $0 {}"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"if"},{"label":"if let","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"if let $1 = $0 {}"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"if let"},{"label":"let","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"let "},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"let"},{"label":"mod","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"mod $0"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"mod"},{"label":"const","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"const "},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"const"},{"label":"type","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"type "},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"type"},{"label":"static","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"static "},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"static"},{"label":"extern","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"extern "},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"extern"},{"label":"unsafe","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"unsafe "},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"unsafe"},{"label":"return","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"return $0;"},"additionalTextEdits":[],"deprecated":false,"kind":14,"insertTextFormat":2,"filterText":"return"},{"label":"pd","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"eprintln!(\"$0 = {:?}\", $0);"},"additionalTextEdits":[],"deprecated":false,"kind":15,"insertTextFormat":2,"filterText":"pd"},{"label":"ppd","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"eprintln!(\"$0 = {:#?}\", $0);"},"additionalTextEdits":[],"deprecated":false,"kind":15,"insertTextFormat":2,"filterText":"ppd"},{"label":"listener","insertTextFormat":1,"additionalTextEdits":[],"deprecated":false,"kind":6,"filterText":"listener","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"listener"},"detail":"TcpListener<AppState>"},{"label":"app","insertTextFormat":1,"additionalTextEdits":[],"deprecated":false,"kind":6,"filterText":"app","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"app"},"detail":"Server<AppState>"},{"label":"appstate","insertTextFormat":1,"additionalTextEdits":[],"deprecated":false,"kind":6,"filterText":"appstate","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"appstate"},"detail":"AppState"},{"label":"pool","insertTextFormat":1,"additionalTextEdits":[],"deprecated":false,"kind":6,"filterText":"pool","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"pool"},"detail":"Pool<Sqlite>"},{"label":"addr","insertTextFormat":1,"additionalTextEdits":[],"deprecated":false,"kind":6,"filterText":"addr","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"addr"},"detail":"SocketAddr"},{"label":"config","insertTextFormat":1,"additionalTextEdits":[],"deprecated":false,"kind":6,"filterText":"config","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"config"},"detail":"Config"},{"label":"Config","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Config"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"Config"},{"label":"Arc","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Arc"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"A thread-safe reference-counting pointer. 'Arc' stands for 'Atomically\nReference Counted'.\n\nThe type `Arc<T>` provides shared ownership of a value of type `T`,\nallocated in the heap. Invoking [`clone`][clone] on `Arc` produces\na new `Arc` instance, which points to the same allocation on the heap as the\nsource `Arc`, while increasing a reference count. When the last `Arc`\npointer to a given allocation is destroyed, the value stored in that allocation (often\nreferred to as \"inner value\") is also dropped.\n\nShared references in Rust disallow mutation by default, and `Arc` is no\nexception: you cannot generally obtain a mutable reference to something\ninside an `Arc`. If you need to mutate through an `Arc`, use\n[`Mutex`][mutex], [`RwLock`][rwlock], or one of the [`Atomic`][atomic]\ntypes.\n\n## Thread Safety\n\nUnlike [`Rc<T>`], `Arc<T>` uses atomic operations for its reference\ncounting. This means that it is thread-safe. The disadvantage is that\natomic operations are more expensive than ordinary memory accesses. If you\nare not sharing reference-counted allocations between threads, consider using\n[`Rc<T>`] for lower overhead. [`Rc<T>`] is a safe default, because the\ncompiler will catch any attempt to send an [`Rc<T>`] between threads.\nHowever, a library might choose `Arc<T>` in order to give library consumers\nmore flexibility.\n\n`Arc<T>` will implement [`Send`] and [`Sync`] as long as the `T` implements\n[`Send`] and [`Sync`]. Why can't you put a non-thread-safe type `T` in an\n`Arc<T>` to make it thread-safe? This may be a bit counter-intuitive at\nfirst: after all, isn't the point of `Arc<T>` thread safety? The key is\nthis: `Arc<T>` makes it thread safe to have multiple ownership of the same\ndata, but it doesn't add thread safety to its data. Consider\n`Arc<`[`RefCell<T>`]`>`. [`RefCell<T>`] isn't [`Sync`], and if `Arc<T>` was always\n[`Send`], `Arc<`[`RefCell<T>`]`>` would be as well. But then we'd have a problem:\n[`RefCell<T>`] is not thread safe; it keeps track of the borrowing count using\nnon-atomic operations.\n\nIn the end, this means that you may need to pair `Arc<T>` with some sort of\n[`std::sync`] type, usually [`Mutex<T>`][mutex].\n\n## Breaking cycles with `Weak`\n\nThe [`downgrade`][downgrade] method can be used to create a non-owning\n[`Weak`] pointer. A [`Weak`] pointer can be [`upgrade`][upgrade]d\nto an `Arc`, but this will return [`None`] if the value stored in the allocation has\nalready been dropped. In other words, `Weak` pointers do not keep the value\ninside the allocation alive; however, they *do* keep the allocation\n(the backing store for the value) alive.\n\nA cycle between `Arc` pointers will never be deallocated. For this reason,\n[`Weak`] is used to break cycles. For example, a tree could have\nstrong `Arc` pointers from parent nodes to children, and [`Weak`]\npointers from children back to their parents.\n\n# Cloning references\n\nCreating a new reference from an existing reference-counted pointer is done using the\n`Clone` trait implemented for [`Arc<T>`][Arc] and [`Weak<T>`][Weak].\n\n```rust\nuse std::sync::Arc;\nlet foo = Arc::new(vec![1.0, 2.0, 3.0]);\n// The two syntaxes below are equivalent.\nlet a = foo.clone();\nlet b = Arc::clone(&foo);\n// a, b, and foo are all Arcs that point to the same memory location\n```\n\n## `Deref` behavior\n\n`Arc<T>` automatically dereferences to `T` (via the [`Deref`][deref] trait),\nso you can call `T`'s methods on a value of type `Arc<T>`. To avoid name\nclashes with `T`'s methods, the methods of `Arc<T>` itself are associated\nfunctions, called using [fully qualified syntax]:\n\n```rust\nuse std::sync::Arc;\n\nlet my_arc = Arc::new(());\nArc::downgrade(&my_arc);\n```\n\n`Arc<T>`'s implementations of traits like `Clone` may also be called using\nfully qualified syntax. Some people prefer to use fully qualified syntax,\nwhile others prefer using method-call syntax.\n\n```rust\nuse std::sync::Arc;\n\nlet arc = Arc::new(());\n// Method-call syntax\nlet arc2 = arc.clone();\n// Fully qualified syntax\nlet arc3 = Arc::clone(&arc);\n```\n\n[`Weak<T>`][Weak] does not auto-dereference to `T`, because the inner value may have\nalready been dropped.\n\n[`Rc<T>`]: crate::rc::Rc\n[clone]: Clone::clone\n[mutex]: ../../std/sync/struct.Mutex.html\n[rwlock]: ../../std/sync/struct.RwLock.html\n[atomic]: core::sync::atomic\n[`Send`]: core::marker::Send\n[`Sync`]: core::marker::Sync\n[deref]: core::ops::Deref\n[downgrade]: Arc::downgrade\n[upgrade]: Weak::upgrade\n[`RefCell<T>`]: core::cell::RefCell\n[`std::sync`]: ../../std/sync/index.html\n[`Arc::clone(&from)`]: Arc::clone\n[fully qualified syntax]: https://doc.rust-lang.org/book/ch19-03-advanced-traits.html#fully-qualified-syntax-for-disambiguation-calling-methods-with-the-same-name\n\n# Examples\n\nSharing some immutable data between threads:\n\n```rust\nuse std::sync::Arc;\nuse std::thread;\n\nlet five = Arc::new(5);\n\nfor _ in 0..10 {\n let five = Arc::clone(&five);\n\n thread::spawn(move || {\n println!(\"{:?}\", five);\n });\n}\n```\n\nSharing a mutable [`AtomicUsize`]:\n\n[`AtomicUsize`]: core::sync::atomic::AtomicUsize\n\n```rust\nuse std::sync::Arc;\nuse std::sync::atomic::{AtomicUsize, Ordering};\nuse std::thread;\n\nlet val = Arc::new(AtomicUsize::new(5));\n\nfor _ in 0..10 {\n let val = Arc::clone(&val);\n\n thread::spawn(move || {\n let v = val.fetch_add(1, Ordering::SeqCst);\n println!(\"{:?}\", v);\n });\n}\n```\n\nSee the [`rc` documentation][rc_examples] for more examples of reference\ncounting in general.\n\n[rc_examples]: crate::rc#examples"},"filterText":"Arc"},{"label":"Status","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Status"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"Provides the `status` method for `Result` and `Option`.\n\nThis trait is sealed and cannot be implemented outside of `http-types`."},"filterText":"Status"},{"label":"SqliteUserBackend","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"SqliteUserBackend"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"SqliteUserBackend"},{"label":"main()","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":3,"filterText":"main","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"main()$0"},"detail":"-> {unknown}"},{"label":"register_routes(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":3,"filterText":"register_routes","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"register_routes(${1:&mut app})$0"},"command":{"title":"triggerParameterHints","command":"editor.action.triggerParameterHints"},"detail":"-> ()"},{"label":"json!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"json!","documentation":{"kind":"markdown","value":"Construct a `serde_json::Value` from a JSON literal.\n\n```rust\nlet value = json!({\n \"code\": 200,\n \"success\": true,\n \"payload\": {\n \"features\": [\n \"serde\",\n \"json\"\n ]\n }\n});\n```\n\nVariables or expressions can be interpolated into the JSON literal. Any type\ninterpolated into an array element or object value must implement Serde's\n`Serialize` trait, while any type interpolated into a object key must\nimplement `Into<String>`. If the `Serialize` implementation of the\ninterpolated type decides to fail, or if the interpolated type contains a\nmap with non-string keys, the `json!` macro will panic.\n\n```rust\nlet code = 200;\nlet features = vec![\"serde\", \"json\"];\n\nlet value = json!({\n \"code\": code,\n \"success\": code == 200,\n \"payload\": {\n features[0]: features[1]\n }\n});\n```\n\nTrailing commas are allowed inside both arrays and objects.\n\n```rust\nlet value = json!([\n \"notice\",\n \"the\",\n \"trailing\",\n \"comma -->\",\n]);\n```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"json!($0)"},"detail":"macro_rules! json"},{"label":"SqlitePool","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"SqlitePool"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"An alias for [`Pool`][crate::pool::Pool], specialized for SQLite."},"filterText":"SqlitePool"},{"label":"objstor","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"objstor"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"filterText":"objstor"},{"label":"Listener","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Listener"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"The Listener trait represents an implementation of http transport for a tide\napplication. In order to provide a Listener to tide, you will also need to\nimplement at least one [`ToListener`](crate::listener::ToListener) that\noutputs your Listener type."},"filterText":"Listener"},{"label":"Deserialize","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Deserialize"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"A **data structure** that can be deserialized from any data format supported\nby Serde.\n\nSerde provides `Deserialize` implementations for many Rust primitive and\nstandard library types. The complete list is [here][de]. All of these can\nbe deserialized using Serde out of the box.\n\nAdditionally, Serde provides a procedural macro called `serde_derive` to\nautomatically generate `Deserialize` implementations for structs and enums\nin your program. See the [derive section of the manual][derive] for how to\nuse this.\n\nIn rare cases it may be necessary to implement `Deserialize` manually for\nsome type in your program. See the [Implementing\n`Deserialize`][impl-deserialize] section of the manual for more about this.\n\nThird-party crates may provide `Deserialize` implementations for types that\nthey expose. For example the `linked-hash-map` crate provides a\n`LinkedHashMap<K, V>` type that is deserializable by Serde because the crate\nprovides an implementation of `Deserialize` for it.\n\n[de]: https://docs.serde.rs/serde/de/index.html\n[derive]: https://serde.rs/derive.html\n[impl-deserialize]: https://serde.rs/impl-deserialize.html\n\n# Lifetime\n\nThe `'de` lifetime of this trait is the lifetime of data that may be\nborrowed by `Self` when deserialized. See the page [Understanding\ndeserializer lifetimes] for a more detailed explanation of these lifetimes.\n\n[Understanding deserializer lifetimes]: https://serde.rs/lifetimes.html"},"filterText":"Deserialize"},{"label":"Deserialize!(…)","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Deserialize!($0)"},"additionalTextEdits":[],"deprecated":false,"kind":2,"insertTextFormat":2,"filterText":"Deserialize!"},{"label":"Result","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Result"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"`Result<T, Error>`\n\nThis is a reasonable return type to use throughout your application but also\nfor `fn main`; if you do, failures will be printed along with any\n[context][Context] and a backtrace if one was captured.\n\n`anyhow::Result` may be used with one *or* two type parameters.\n\n```rust\nuse anyhow::Result;\n\nfn demo1() -> Result<T> {...}\n // ^ equivalent to std::result::Result<T, anyhow::Error>\n\nfn demo2() -> Result<T, OtherError> {...}\n // ^ equivalent to std::result::Result<T, OtherError>\n```\n\n# Example\n\n```rust\nuse anyhow::Result;\n\nfn main() -> Result<()> {\n let config = std::fs::read_to_string(\"cluster.json\")?;\n let map: ClusterMap = serde_json::from_str(&config)?;\n println!(\"cluster info: {:#?}\", map);\n Ok(())\n}\n```"},"filterText":"Result"},{"label":"AppState","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"AppState"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"AppState"},{"label":"Serialize","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Serialize"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"A **data structure** that can be serialized into any data format supported\nby Serde.\n\nSerde provides `Serialize` implementations for many Rust primitive and\nstandard library types. The complete list is [here][ser]. All of these can\nbe serialized using Serde out of the box.\n\nAdditionally, Serde provides a procedural macro called [`serde_derive`] to\nautomatically generate `Serialize` implementations for structs and enums in\nyour program. See the [derive section of the manual] for how to use this.\n\nIn rare cases it may be necessary to implement `Serialize` manually for some\ntype in your program. See the [Implementing `Serialize`] section of the\nmanual for more about this.\n\nThird-party crates may provide `Serialize` implementations for types that\nthey expose. For example the [`linked-hash-map`] crate provides a\n[`LinkedHashMap<K, V>`] type that is serializable by Serde because the crate\nprovides an implementation of `Serialize` for it.\n\n[Implementing `Serialize`]: https://serde.rs/impl-serialize.html\n[`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html\n[`linked-hash-map`]: https://crates.io/crates/linked-hash-map\n[`serde_derive`]: https://crates.io/crates/serde_derive\n[derive section of the manual]: https://serde.rs/derive.html\n[ser]: https://docs.serde.rs/serde/ser/index.html"},"filterText":"Serialize"},{"label":"Serialize!(…)","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Serialize!($0)"},"additionalTextEdits":[],"deprecated":false,"kind":2,"insertTextFormat":2,"filterText":"Serialize!"},{"label":"debug_assert_eq!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"debug_assert_eq!($0)"},"detail":"#[macro_export] macro_rules! debug_assert_eq"},{"label":"stringify!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"stringify!($0)"},"detail":"#[macro_export] macro_rules! stringify"},{"label":"concat!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"concat!($0)"},"detail":"#[macro_export] macro_rules! concat"},{"label":"format!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"format!($0)"},"detail":"#[macro_export] macro_rules! format"},{"label":"log_syntax!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"log_syntax!","documentation":{"kind":"markdown","value":"Prints passed tokens into the standard output."},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"log_syntax!($0)"},"detail":"#[macro_export] macro_rules! log_syntax"},{"label":"include_str!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```ignore (cannot-doctest-external-file-dependency)\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\"."},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"include_str!($0)"},"detail":"#[macro_export] macro_rules! include_str"},{"label":"__thread_local_inner!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"__thread_local_inner!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"__thread_local_inner!($0)"},"detail":"#[macro_export] macro_rules! __thread_local_inner"},{"label":"assert_ne!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"assert_ne!($0)"},"detail":"#[macro_export] macro_rules! assert_ne"},{"label":"dbg!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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.\nUse cases involving debug output that should be added to version control\nare better served by macros such as [`debug!`] 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 call:\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"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"dbg!($0)"},"detail":"#[macro_export] macro_rules! dbg"},{"label":"vec![…]","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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\n[`Vec`]: crate::vec::Vec"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"vec![$0]"},"detail":"#[macro_export] macro_rules! vec"},{"label":"include!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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 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```ignore (only-for-syntax-highlight)\n['🙈', '🙊', '🙉']\n .iter()\n .cycle()\n .take(6)\n .collect::<String>()\n```\n\nFile 'main.rs':\n\n```ignore (cannot-doctest-external-file-dependency)\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\"🙈🙊🙉🙈🙊🙉\"."},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"include!($0)"},"detail":"#[macro_export] macro_rules! include"},{"label":"print!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"print!($0)"},"detail":"#[macro_export] macro_rules! print"},{"label":"concat_idents!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"concat_idents!($0)"},"detail":"#[macro_export] macro_rules! concat_idents"},{"label":"write!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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`]: ../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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"write!($0)"},"detail":"#[macro_export] macro_rules! write"},{"label":"line!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"line!($0)"},"detail":"#[macro_export] macro_rules! line"},{"label":"env!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"env!($0)"},"detail":"#[macro_export] macro_rules! env"},{"label":"debug_assert!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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 be\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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"debug_assert!($0)"},"detail":"#[macro_export] macro_rules! debug_assert"},{"label":"include_bytes!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```ignore (cannot-doctest-external-file-dependency)\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\"."},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"include_bytes!($0)"},"detail":"#[macro_export] macro_rules! include_bytes"},{"label":"thread_local! {…}","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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 [`LocalKey` documentation][`std::thread::LocalKey`] for more\ninformation.\n\n[`std::thread::LocalKey`]: crate::thread::LocalKey"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"thread_local! {$0}"},"detail":"#[macro_export] macro_rules! thread_local"},{"label":"global_asm!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"global_asm!","documentation":{"kind":"markdown","value":"Module-level inline assembly."},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"global_asm!($0)"},"detail":"#[macro_export] macro_rules! global_asm"},{"label":"file!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"file!($0)"},"detail":"#[macro_export] macro_rules! file"},{"label":"try!(…)","tags":[1],"insertTextFormat":2,"additionalTextEdits":[],"deprecated":true,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"try!($0)"},"detail":"#[macro_export] macro_rules! r#try"},{"label":"assert!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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\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.\n\n[`std::fmt`]: crate::fmt\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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"assert!($0)"},"detail":"#[macro_export] macro_rules! assert"},{"label":"llvm_asm!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"llvm_asm!","documentation":{"kind":"markdown","value":"LLVM-style inline assembly.\n\nRead the [unstable book] for the usage.\n\n[unstable book]: ../unstable-book/library-features/llvm-asm.html"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"llvm_asm!($0)"},"detail":"#[macro_export] macro_rules! llvm_asm"},{"label":"column!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"column!($0)"},"detail":"#[macro_export] macro_rules! column"},{"label":"format_args_nl!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"format_args_nl!","documentation":{"kind":"markdown","value":"Same as `format_args`, but adds a newline in the end."},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"format_args_nl!($0)"},"detail":"#[macro_export] macro_rules! format_args_nl"},{"label":"unreachable!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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!`]\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 => 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!();\n}\n```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"unreachable!($0)"},"detail":"#[macro_export] macro_rules! unreachable"},{"label":"eprintln!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"eprintln!($0)"},"detail":"#[macro_export] macro_rules! eprintln"},{"label":"unimplemented!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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 of using all of.\n\nThe difference between `unimplemented!` and [`todo!`](macro.todo.html) 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!](macro.panic.html) because `unimplemented!` is just a\nshorthand for `panic!` with a fixed, 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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"unimplemented!($0)"},"detail":"#[macro_export] macro_rules! unimplemented"},{"label":"cfg!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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 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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"cfg!($0)"},"detail":"#[macro_export] macro_rules! cfg"},{"label":"todo!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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!](macro.panic.html)\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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"todo!($0)"},"detail":"#[macro_export] macro_rules! todo"},{"label":"asm!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"asm!","documentation":{"kind":"markdown","value":"Inline assembly.\n\nRead the [unstable book] for the usage.\n\n[unstable book]: ../unstable-book/library-features/asm.html"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"asm!($0)"},"detail":"#[macro_export] macro_rules! asm"},{"label":"trace_macros!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"trace_macros!","documentation":{"kind":"markdown","value":"Enables or disables tracing functionality used for debugging other macros."},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"trace_macros!($0)"},"detail":"#[macro_export] macro_rules! trace_macros"},{"label":"writeln!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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`]: crate::fmt\n\n# Examples\n\n```rust\nuse std::io::{Write, Result};\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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"writeln!($0)"},"detail":"#[macro_export] macro_rules! writeln"},{"label":"option_env!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"option_env!($0)"},"detail":"#[macro_export] macro_rules! option_env"},{"label":"module_path!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"module_path!($0)"},"detail":"#[macro_export] macro_rules! module_path"},{"label":"compile_error!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"compile_error!($0)"},"detail":"#[macro_export] macro_rules! compile_error"},{"label":"matches!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```rust\nlet foo = 'f';\nassert!(matches!(foo, 'A'..='Z' | 'a'..='z'));\n\nlet bar = Some(4);\nassert!(matches!(bar, Some(x) if x > 2));\n```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"matches!($0)"},"detail":"#[macro_export] macro_rules! matches"},{"label":"assert_eq!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"assert_eq!($0)"},"detail":"#[macro_export] macro_rules! assert_eq"},{"label":"println!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"println!($0)"},"detail":"#[macro_export] macro_rules! println"},{"label":"format_args!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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`]: crate::fmt\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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"format_args!($0)"},"detail":"#[macro_export] macro_rules! format_args"},{"label":"eprint!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"eprint!($0)"},"detail":"#[macro_export] macro_rules! eprint"},{"label":"debug_assert_ne!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"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 `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```"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"debug_assert_ne!($0)"},"detail":"#[macro_export] macro_rules! debug_assert_ne"},{"label":"panic!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"panic!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"panic!($0)"},"detail":"#[macro_export] macro_rules! panic"},{"label":"std","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"std"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"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 interesting 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 `[src]`\nbutton. 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.html) 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]`][slice] (also\ncalled 'slice'). Many method calls on [`String`] and [`Vec<T>`] are actually\ncalls to methods on [`str`] and [`[T]`][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 *vector* that is resizable at runtime.\n* [`[T; n]`][array] - An inline *array* with a fixed size at compile time.\n* [`[T]`][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`]: 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"},"filterText":"std"},{"label":"bcrypt","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"bcrypt"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"Easily hash and verify passwords using bcrypt"},"filterText":"bcrypt"},{"label":"sqlx","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"sqlx"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"filterText":"sqlx"},{"label":"alloc","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"alloc"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"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"},"filterText":"alloc"},{"label":"uuid","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"uuid"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"Generate and parse UUIDs.\n\nProvides support for Universally Unique Identifiers (UUIDs). A UUID is a\nunique 128-bit number, stored as 16 octets. UUIDs are used to assign\nunique identifiers to entities without requiring a central allocating\nauthority.\n\nThey are particularly useful in distributed systems, though can be used in\ndisparate areas, such as databases and network protocols. Typically a UUID\nis displayed in a readable string form as a sequence of hexadecimal digits,\nseparated into groups by hyphens.\n\nThe uniqueness property is not strictly guaranteed, however for all\npractical purposes, it can be assumed that an unintentional collision would\nbe extremely unlikely.\n\n# Dependencies\n\nBy default, this crate depends on nothing but `std` and cannot generate\nUUIDs. You need to enable the following Cargo features to enable\nvarious pieces of functionality:\n\n* `v1` - adds the [`Uuid::new_v1`] function and the ability to create a V1\n using an implementation of [`v1::ClockSequence`] (usually\n[`v1::Context`]) and a timestamp from `time::timespec`.\n* `v3` - adds the [`Uuid::new_v3`] function and the ability to create a V3\n UUID based on the MD5 hash of some data.\n* `v4` - adds the [`Uuid::new_v4`] function and the ability to randomly\n generate a UUID.\n* `v5` - adds the [`Uuid::new_v5`] function and the ability to create a V5\n UUID based on the SHA1 hash of some data.\n* `serde` - adds the ability to serialize and deserialize a UUID using the\n `serde` crate.\n\nFor WebAssembly, enable one of the following features depending\non your JavaScript interop toolchain of choice:\n\n* `stdweb` - for [`stdweb`] combined with [`cargo-web`]\n* `wasm-bindgen` - for [`wasm-bindgen`]\n\nBy default, `uuid` can be depended on with:\n\n```toml\n[dependencies]\nuuid = \"0.8\"\n```\n\nTo activate various features, use syntax like:\n\n```toml\n[dependencies]\nuuid = { version = \"0.8\", features = [\"serde\", \"v4\"] }\n```\n\nYou can disable default features with:\n\n```toml\n[dependencies]\nuuid = { version = \"0.8\", default-features = false }\n```\n\n# Examples\n\nTo parse a UUID given in the simple format and print it as a urn:\n\n```rust\nuse uuid::Uuid;\n\nfn main() -> Result<(), uuid::Error> {\n let my_uuid =\n Uuid::parse_str(\"936DA01F9ABD4d9d80C702AF85C822A8\")?;\n println!(\"{}\", my_uuid.to_urn());\n Ok(())\n}\n```\n\nTo create a new random (V4) UUID and print it out in hexadecimal form:\n\n```rust\n// Note that this requires the `v4` feature enabled in the uuid crate.\n\nuse uuid::Uuid;\n\nfn main() -> Result<(), Box<dyn std::error::Error>> {\n #[cfg(feature = \"v4\")] {\n let my_uuid = Uuid::new_v4()?;\n println!(\"{}\", my_uuid);\n }\n Ok(())\n}\n```\n\n# Strings\n\nExamples of string representations:\n\n* simple: `936DA01F9ABD4d9d80C702AF85C822A8`\n* hyphenated: `550e8400-e29b-41d4-a716-446655440000`\n* urn: `urn:uuid:F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4`\n\n# References\n\n* [Wikipedia: Universally Unique Identifier](http://en.wikipedia.org/wiki/Universally_unique_identifier)\n* [RFC4122: A Universally Unique IDentifier (UUID) URN Namespace](http://tools.ietf.org/html/rfc4122)\n\n[`wasm-bindgen`]: https://crates.io/crates/wasm-bindgen\n[`cargo-web`]: https://crates.io/crates/cargo-web\n[`stdweb`]: https://crates.io/crates/stdweb\n[`Uuid`]: struct.Uuid.html\n[`Uuid::new_v1`]: struct.Uuid.html#method.new_v1\n[`Uuid::new_v3`]: struct.Uuid.html#method.new_v3\n[`Uuid::new_v4`]: struct.Uuid.html#method.new_v4\n[`Uuid::new_v5`]: struct.Uuid.html#method.new_v5\n[`v1::ClockSequence`]: v1/trait.ClockSequence.html\n[`v1::Context`]: v1/struct.Context.html"},"filterText":"uuid"},{"label":"async_trait","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"async_trait"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"[![github]](https://github.com/dtolnay/async-trait)&ensp;[![crates-io]](https://crates.io/crates/async-trait)&ensp;[![docs-rs]](https://docs.rs/async-trait)\n\n[github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github\n[crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust\n[docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K\n\n<br>\n\n<h5>Type erasure for async trait methods</h5>\n\nThe initial round of stabilizations for the async/await language feature in\nRust 1.39 did not include support for async fn in traits. Trying to include\nan async fn in a trait produces the following error:\n\n```rust\ntrait MyTrait {\n async fn f() {}\n}\n```\n\n```text\nerror[E0706]: trait fns cannot be declared `async`\n --> src/main.rs:4:5\n |\n4 | async fn f() {}\n | ^^^^^^^^^^^^^^^\n```\n\nThis crate provides an attribute macro to make async fn in traits work.\n\nPlease refer to [*why async fn in traits are hard*][hard] for a deeper\nanalysis of how this implementation differs from what the compiler and\nlanguage hope to deliver in the future.\n\n[hard]: https://smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-hard/\n\n<br>\n\n# Example\n\nThis example implements the core of a highly effective advertising platform\nusing async fn in a trait.\n\nThe only thing to notice here is that we write an `#[async_trait]` macro on\ntop of traits and trait impls that contain async fn, and then they work.\n\n```rust\nuse async_trait::async_trait;\n\n#[async_trait]\ntrait Advertisement {\n async fn run(&self);\n}\n\nstruct Modal;\n\n#[async_trait]\nimpl Advertisement for Modal {\n async fn run(&self) {\n self.render_fullscreen().await;\n for _ in 0..4u16 {\n remind_user_to_join_mailing_list().await;\n }\n self.hide_for_now().await;\n }\n}\n\nstruct AutoplayingVideo {\n media_url: String,\n}\n\n#[async_trait]\nimpl Advertisement for AutoplayingVideo {\n async fn run(&self) {\n let stream = connect(&self.media_url).await;\n stream.play().await;\n\n // Video probably persuaded user to join our mailing list!\n Modal.run().await;\n }\n}\n```\n\n<br><br>\n\n# Supported features\n\nIt is the intention that all features of Rust traits should work nicely with\n#\\[async_trait\\], but the edge cases are numerous. Please file an issue if\nyou see unexpected borrow checker errors, type errors, or warnings. There is\nno use of `unsafe` in the expanded code, so rest assured that if your code\ncompiles it can't be that badly broken.\n\n> &#9745;&emsp;Self by value, by reference, by mut reference, or no self;<br>\n> &#9745;&emsp;Any number of arguments, any return value;<br>\n> &#9745;&emsp;Generic type parameters and lifetime parameters;<br>\n> &#9745;&emsp;Associated types;<br>\n> &#9745;&emsp;Having async and non-async functions in the same trait;<br>\n> &#9745;&emsp;Default implementations provided by the trait;<br>\n> &#9745;&emsp;Elided lifetimes;<br>\n> &#9745;&emsp;Dyn-capable traits.<br>\n\n<br>\n\n# Explanation\n\nAsync fns get transformed into methods that return `Pin<Box<dyn Future +\nSend + 'async>>` and delegate to a private async freestanding function.\n\nFor example the `impl Advertisement for AutoplayingVideo` above would be\nexpanded as:\n\n```rust\nimpl Advertisement for AutoplayingVideo {\n fn run<'async>(\n &'async self,\n ) -> Pin<Box<dyn core::future::Future<Output = ()> + Send + 'async>>\n where\n Self: Sync + 'async,\n {\n async fn run(_self: &AutoplayingVideo) {\n /* the original method body */\n }\n\n Box::pin(run(self))\n }\n}\n```\n\n<br><br>\n\n# Non-threadsafe futures\n\nNot all async traits need futures that are `dyn Future + Send`. To avoid\nhaving Send and Sync bounds placed on the async trait methods, invoke the\nasync trait macro as `#[async_trait(?Send)]` on both the trait and the impl\nblocks.\n\n<br>\n\n# Elided lifetimes\n\nBe aware that async fn syntax does not allow lifetime elision outside of `&`\nand `&mut` references. (This is true even when not using #\\[async_trait\\].)\nLifetimes must be named or marked by the placeholder `'_`.\n\nFortunately the compiler is able to diagnose missing lifetimes with a good\nerror message.\n\n```rust\ntype Elided<'a> = &'a usize;\n\n#[async_trait]\ntrait Test {\n async fn test(not_okay: Elided, okay: &usize) {}\n}\n```\n\n```text\nerror[E0726]: implicit elided lifetime not allowed here\n --> src/main.rs:9:29\n |\n9 | async fn test(not_okay: Elided, okay: &usize) {}\n | ^^^^^^- help: indicate the anonymous lifetime: `<'_>`\n```\n\nThe fix is to name the lifetime or use `'_`.\n\n```rust\n#[async_trait]\ntrait Test {\n // either\n async fn test<'e>(elided: Elided<'e>) {}\n // or\n async fn test(elided: Elided<'_>) {}\n}\n```\n\n<br><br>\n\n# Dyn traits\n\nTraits with async methods can be used as trait objects as long as they meet\nthe usual requirements for dyn -- no methods with type parameters, no self\nby value, no associated types, etc.\n\n```rust\n#[async_trait]\npub trait ObjectSafe {\n async fn f(&self);\n async fn g(&mut self);\n}\n\nimpl ObjectSafe for MyType {...}\n\nlet value: MyType = ...;\nlet object = &value as &dyn ObjectSafe; // make trait object\n```\n\nThe one wrinkle is in traits that provide default implementations of async\nmethods. In order for the default implementation to produce a future that is\nSend, the async_trait macro must emit a bound of `Self: Sync` on trait\nmethods that take `&self` and a bound `Self: Send` on trait methods that\ntake `&mut self`. An example of the former is visible in the expanded code\nin the explanation section above.\n\nIf you make a trait with async methods that have default implementations,\neverything will work except that the trait cannot be used as a trait object.\nCreating a value of type `&dyn Trait` will produce an error that looks like\nthis:\n\n```text\nerror: the trait `Test` cannot be made into an object\n --> src/main.rs:8:5\n |\n8 | async fn cannot_dyn(&self) {}\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n```\n\nFor traits that need to be object safe and need to have default\nimplementations for some async methods, there are two resolutions. Either\nyou can add Send and/or Sync as supertraits (Send if there are `&mut self`\nmethods with default implementations, Sync if there are `&self` methods with\ndefault implementions) to constrain all implementors of the trait such that\nthe default implementations are applicable to them:\n\n```rust\n#[async_trait]\npub trait ObjectSafe: Sync { // added supertrait\n async fn can_dyn(&self) {}\n}\n\nlet object = &value as &dyn ObjectSafe;\n```\n\nor you can strike the problematic methods from your trait object by\nbounding them with `Self: Sized`:\n\n```rust\n#[async_trait]\npub trait ObjectSafe {\n async fn cannot_dyn(&self) where Self: Sized {}\n\n // presumably other methods\n}\n\nlet object = &value as &dyn ObjectSafe;\n```"},"filterText":"async_trait"},{"label":"async_std","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"async_std"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"# Async version of the Rust standard library\n\n`async-std` is a foundation of portable Rust software, a set of minimal and battle-tested\nshared abstractions for the [broader Rust ecosystem][crates.io]. It offers std types, like\n[`Future`] and [`Stream`], library-defined [operations on language primitives](#primitives),\n[standard macros](#macros), [I/O] and [multithreading], among [many other things][other].\n\n`async-std` is available from [crates.io]. Once included, `async-std` can be accessed\nin [`use`] statements through the path `async_std`, as in [`use async_std::future`].\n\n[I/O]: io/index.html\n[multithreading]: task/index.html\n[other]: #what-is-in-the-standard-library-documentation\n[`use`]: https://doc.rust-lang.org/book/ch07-02-defining-modules-to-control-scope-and-privacy.html\n[`use async_std::future`]: future/index.html\n[crates.io]: https://crates.io\n[`Future`]: future/trait.Future.html\n[`Stream`]: stream/trait.Stream.html\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* [`async_std::*` modules](#modules)\n* [Async macros](#macros)\n* [The Async Prelude](prelude/index.html)\n* [Cargo.toml feature flags](#features)\n* [Examples](#examples)\n\nIf this is your first time, the documentation for `async-std` is\nwritten to be casually perused. Clicking on interesting 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 `async-std` and\nits documentation!\n\nOnce you are familiar with the contents of `async-std` 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 `[src]`\nbutton. Rust's API documentation comes with the source code and you are\nencouraged to read it. The `async-std` source is generally high\nquality and a peek behind the curtains is often enlightening.\n\nModules in this crate are organized in the same way as in `std`, except blocking\nfunctions have been replaced with async functions and threads have been replaced with\nlightweight tasks.\n\nYou can find more information, reading materials, and other resources here:\n\n* [The async-std website](https://async.rs/)\n* [The async-std book](https://book.async.rs)\n* [GitHub repository](https://github.com/async-rs/async-std)\n* [List of code examples](https://github.com/async-rs/async-std/tree/master/examples)\n* [Discord chat](https://discord.gg/JvZeVNe)\n\n# What is in the `async-std` documentation?\n\nFirst, `async-std` is divided into a number of focused\nmodules, [all listed further down this page](#modules). These modules are\nthe bedrock upon which async Rust is forged, and they have mighty names\nlike [`async_std::os`] and [`async_std::task`]. Modules' documentation\ntypically includes an overview of the module along with examples, and are\na smart place to start familiarizing yourself with the library.\n\nSecond, `async-std` defines [The Async Prelude], a small collection\nof items - mostly traits - that should be imported into every module of\nevery async crate. The traits in the prelude are pervasive, making the\nprelude documentation a good entry point to learning about the library.\n\n[The Async Prelude]: prelude/index.html\n[`async_std::os`]: os/index.html\n[`async_std::task`]: task/index.html\n\nAnd finally, `async-std` exports a number of async macros, and\n[lists them on this page](#macros).\n\n# Contributing changes to the documentation\n\nCheck out `async-std`'s contribution guidelines [here](https://async.rs/contribute).\nThe source for this documentation can be found on [GitHub](https://github.com/async-rs).\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\n[Discord](https://discord.gg/JvZeVNe).\n\n# A tour of `async-std`\n\nThe rest of this crate documentation is dedicated to pointing out notable\nfeatures of `async-std`.\n\n## Platform abstractions and I/O\n\nBesides basic data types, `async-std` 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 [`task`] module contains `async-std`'s task abstractions. [`sync`]\ncontains further primitive shared memory types. [`channel`] contains the channel types for message passing.\n\n[files]: fs/struct.File.html\n[TCP]: net/struct.TcpStream.html\n[UDP]: net/struct.UdpSocket.html\n[`io`]: fs/struct.File.html\n[`sync`]: sync/index.html\n[`channel`]: channel/index.html\n\n## Timeouts, intervals, and delays\n\n`async-std` provides several methods to manipulate time:\n\n* [`task::sleep`] to wait for a duration to pass without blocking.\n* [`stream::interval`] for emitting an event at a set interval.\n* [`future::timeout`] to time-out futures if they don't resolve within a\n set interval.\n\n[`task::sleep`]: task/fn.sleep.html\n[`stream::interval`]: stream/fn.interval.html\n[`future::timeout`]: future/fn.timeout.html\n\n# Examples\n\nAll examples require the [`\"attributes\"` feature](#features) to be enabled.\nThis feature is not enabled by default because it significantly impacts\ncompile times. See [`task::block_on`] for an alternative way to start\nexecuting tasks.\n\nCall an async function from the main function:\n\n```rust\nasync fn say_hello() {\n println!(\"Hello, world!\");\n}\n\n#[async_std::main]\nasync fn main() {\n say_hello().await;\n}\n```\n\nAwait two futures concurrently, and return a tuple of their output:\n\n```rust\nuse async_std::prelude::*;\n\n#[async_std::main]\nasync fn main() {\n let a = async { 1u8 };\n let b = async { 2u8 };\n assert_eq!(a.join(b).await, (1u8, 2u8))\n}\n```\n\nCreate a UDP server that echoes back each received message to the sender:\n\n```rust\nuse async_std::net::UdpSocket;\n\n#[async_std::main]\nasync fn main() -> std::io::Result<()> {\n let socket = UdpSocket::bind(\"127.0.0.1:8080\").await?;\n println!(\"Listening on {}\", socket.local_addr()?);\n\n let mut buf = vec![0u8; 1024];\n\n loop {\n let (recv, peer) = socket.recv_from(&mut buf).await?;\n let sent = socket.send_to(&buf[..recv], &peer).await?;\n println!(\"Sent {} out of {} bytes to {}\", sent, recv, peer);\n }\n}\n```\n[`task::block_on`]: task/fn.block_on.html\n\n# Features\n\nItems marked with\n<span\n class=\"module-item stab portability\"\n style=\"display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;\"\n><code>unstable</code></span>\nare available only when the `unstable` Cargo feature is enabled:\n\n```toml\n[dependencies.async-std]\nversion = \"1.7.0\"\nfeatures = [\"unstable\"]\n```\n\nItems marked with\n<span\n class=\"module-item stab portability\"\n style=\"display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;\"\n><code>attributes</code></span>\nare available only when the `attributes` Cargo feature is enabled:\n\n```toml\n[dependencies.async-std]\nversion = \"1.7.0\"\nfeatures = [\"attributes\"]\n```\n\nCompatibility with the `tokio` 1.0 runtime is also simultaneously possible\nusing the `tokio1` Cargo feature:\n\n```toml\n[dependencies.async-std]\nversion = \"1.7.0\"\nfeatures = [\"tokio1\"]\n```\n\nCompatibility with the `tokio` 0.2 runtime is possible using the `tokio02`\nCargo feature:\n\n```toml\n[dependencies.async-std]\nversion = \"1.7.0\"\nfeatures = [\"tokio02\"]\n```\n\nCompatibility with the `tokio` 0.3 runtime is also simultaneously possible\nusing the `tokio03` Cargo feature:\n\n```toml\n[dependencies.async-std]\nversion = \"1.7.0\"\nfeatures = [\"tokio03\"]\n```\n\nAdditionally it's possible to only use the core traits and combinators by\nonly enabling the `std` Cargo feature:\n\n```toml\n[dependencies.async-std]\nversion = \"1.7.0\"\ndefault-features = false\nfeatures = [\"std\"]\n```\n\nAnd to use async-std on `no_std` targets that only support `alloc` only\nenable the `alloc` Cargo feature:\n\n```toml\n[dependencies.async-std]\nversion = \"1.7.0\"\ndefault-features = false\nfeatures = [\"alloc\"]\n```\n\n# Runtime configuration\n\nSeveral environment variables are available to tune the async-std\nruntime:\n\n* `ASYNC_STD_THREAD_COUNT`: The number of threads that the\nasync-std runtime will start. By default, this is one per logical\ncpu as reported by the [num_cpus](num_cpus) crate, which may be\ndifferent than the number of physical cpus. Async-std _will panic_\nif this is set to any value other than a positive integer.\n* `ASYNC_STD_THREAD_NAME`: The name that async-std's runtime\nthreads report to the operating system. The default value is\n`\"async-std/runtime\"`."},"filterText":"async_std"},{"label":"core","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"core"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"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`, `memset` - 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`."},"filterText":"core"},{"label":"chrono","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"chrono"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"# Chrono: Date and Time for Rust\n\nIt aims to be a feature-complete superset of\nthe [time](https://github.com/rust-lang-deprecated/time) library.\nIn particular,\n\n* Chrono strictly adheres to ISO 8601.\n* Chrono is timezone-aware by default, with separate timezone-naive types.\n* Chrono is space-optimal and (while not being the primary goal) reasonably efficient.\n\nThere were several previous attempts to bring a good date and time library to Rust,\nwhich Chrono builds upon and should acknowledge:\n\n* [Initial research on\n the wiki](https://github.com/rust-lang/rust-wiki-backup/blob/master/Lib-datetime.md)\n* Dietrich Epp's [datetime-rs](https://github.com/depp/datetime-rs)\n* Luis de Bethencourt's [rust-datetime](https://github.com/luisbg/rust-datetime)\n\nAny significant changes to Chrono are documented in\nthe [`CHANGELOG.md`](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) file.\n\n## Usage\n\nPut this in your `Cargo.toml`:\n\n```toml\n[dependencies]\nchrono = \"0.4\"\n```\n\n### Features\n\nChrono supports various runtime environments and operating systems, and has\nseveral features that may be enabled or disabled.\n\nDefault features:\n\n- `alloc`: Enable features that depend on allocation (primarily string formatting)\n- `std`: Enables functionality that depends on the standard library. This\n is a superset of `alloc` and adds interoperation with standard library types\n and traits.\n- `clock`: enables reading the system time (`now`), independent of whether\n `std::time::SystemTime` is present, depends on having a libc.\n\nOptional features:\n\n- `wasmbind`: Enable integration with [wasm-bindgen][] and its `js-sys` project\n- [`serde`][]: Enable serialization/deserialization via serde.\n- `unstable-locales`: Enable localization. This adds various methods with a\n `_localized` suffix. The implementation and API may change or even be\n removed in a patch release. Feedback welcome.\n\n[`serde`]: https://github.com/serde-rs/serde\n[wasm-bindgen]: https://github.com/rustwasm/wasm-bindgen\n\nSee the [cargo docs][] for examples of specifying features.\n\n[cargo docs]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features\n\n## Overview\n\n### Duration\n\nChrono currently uses its own [`Duration`] type to represent the magnitude\nof a time span. Since this has the same name as the newer, standard type for\nduration, the reference will refer this type as `OldDuration`.\n\nNote that this is an \"accurate\" duration represented as seconds and\nnanoseconds and does not represent \"nominal\" components such as days or\nmonths.\n\nWhen the `oldtime` feature is enabled, [`Duration`] is an alias for the\n[`time::Duration`](https://docs.rs/time/0.1.40/time/struct.Duration.html)\ntype from v0.1 of the time crate. time v0.1 is deprecated, so new code\nshould disable the `oldtime` feature and use the `chrono::Duration` type\ninstead. The `oldtime` feature is enabled by default for backwards\ncompatibility, but future versions of Chrono are likely to remove the\nfeature entirely.\n\nChrono does not yet natively support\nthe standard [`Duration`](https://doc.rust-lang.org/std/time/struct.Duration.html) type,\nbut it will be supported in the future.\nMeanwhile you can convert between two types with\n[`Duration::from_std`](https://docs.rs/time/0.1.40/time/struct.Duration.html#method.from_std)\nand\n[`Duration::to_std`](https://docs.rs/time/0.1.40/time/struct.Duration.html#method.to_std)\nmethods.\n\n### Date and Time\n\nChrono provides a\n[**`DateTime`**](./struct.DateTime.html)\ntype to represent a date and a time in a timezone.\n\nFor more abstract moment-in-time tracking such as internal timekeeping\nthat is unconcerned with timezones, consider\n[`time::SystemTime`](https://doc.rust-lang.org/std/time/struct.SystemTime.html),\nwhich tracks your system clock, or\n[`time::Instant`](https://doc.rust-lang.org/std/time/struct.Instant.html), which\nis an opaque but monotonically-increasing representation of a moment in time.\n\n`DateTime` is timezone-aware and must be constructed from\nthe [**`TimeZone`**](./offset/trait.TimeZone.html) object,\nwhich defines how the local date is converted to and back from the UTC date.\nThere are three well-known `TimeZone` implementations:\n\n* [**`Utc`**](./offset/struct.Utc.html) specifies the UTC time zone. It is most efficient.\n\n* [**`Local`**](./offset/struct.Local.html) specifies the system local time zone.\n\n* [**`FixedOffset`**](./offset/struct.FixedOffset.html) specifies\n an arbitrary, fixed time zone such as UTC+09:00 or UTC-10:30.\n This often results from the parsed textual date and time.\n Since it stores the most information and does not depend on the system environment,\n you would want to normalize other `TimeZone`s into this type.\n\n`DateTime`s with different `TimeZone` types are distinct and do not mix,\nbut can be converted to each other using\nthe [`DateTime::with_timezone`](./struct.DateTime.html#method.with_timezone) method.\n\nYou can get the current date and time in the UTC time zone\n([`Utc::now()`](./offset/struct.Utc.html#method.now))\nor in the local time zone\n([`Local::now()`](./offset/struct.Local.html#method.now)).\n\n```rust\nuse chrono::prelude::*;\n\nlet utc: DateTime<Utc> = Utc::now(); // e.g. `2014-11-28T12:45:59.324310806Z`\nlet local: DateTime<Local> = Local::now(); // e.g. `2014-11-28T21:45:59.324310806+09:00`\n```\n\nAlternatively, you can create your own date and time.\nThis is a bit verbose due to Rust's lack of function and method overloading,\nbut in turn we get a rich combination of initialization methods.\n\n```rust\nuse chrono::prelude::*;\nuse chrono::offset::LocalResult;\n\nlet dt = Utc.ymd(2014, 7, 8).and_hms(9, 10, 11); // `2014-07-08T09:10:11Z`\n// July 8 is 188th day of the year 2014 (`o` for \"ordinal\")\nassert_eq!(dt, Utc.yo(2014, 189).and_hms(9, 10, 11));\n// July 8 is Tuesday in ISO week 28 of the year 2014.\nassert_eq!(dt, Utc.isoywd(2014, 28, Weekday::Tue).and_hms(9, 10, 11));\n\nlet dt = Utc.ymd(2014, 7, 8).and_hms_milli(9, 10, 11, 12); // `2014-07-08T09:10:11.012Z`\nassert_eq!(dt, Utc.ymd(2014, 7, 8).and_hms_micro(9, 10, 11, 12_000));\nassert_eq!(dt, Utc.ymd(2014, 7, 8).and_hms_nano(9, 10, 11, 12_000_000));\n\n// dynamic verification\nassert_eq!(Utc.ymd_opt(2014, 7, 8).and_hms_opt(21, 15, 33),\n LocalResult::Single(Utc.ymd(2014, 7, 8).and_hms(21, 15, 33)));\nassert_eq!(Utc.ymd_opt(2014, 7, 8).and_hms_opt(80, 15, 33), LocalResult::None);\nassert_eq!(Utc.ymd_opt(2014, 7, 38).and_hms_opt(21, 15, 33), LocalResult::None);\n\n// other time zone objects can be used to construct a local datetime.\n// obviously, `local_dt` is normally different from `dt`, but `fixed_dt` should be identical.\nlet local_dt = Local.ymd(2014, 7, 8).and_hms_milli(9, 10, 11, 12);\nlet fixed_dt = FixedOffset::east(9 * 3600).ymd(2014, 7, 8).and_hms_milli(18, 10, 11, 12);\nassert_eq!(dt, fixed_dt);\n```\n\nVarious properties are available to the date and time, and can be altered individually.\nMost of them are defined in the traits [`Datelike`](./trait.Datelike.html) and\n[`Timelike`](./trait.Timelike.html) which you should `use` before.\nAddition and subtraction is also supported.\nThe following illustrates most supported operations to the date and time:\n\n```rust\n\nuse chrono::prelude::*;\nuse chrono::Duration;\n\n// assume this returned `2014-11-28T21:45:59.324310806+09:00`:\nlet dt = FixedOffset::east(9*3600).ymd(2014, 11, 28).and_hms_nano(21, 45, 59, 324310806);\n\n// property accessors\nassert_eq!((dt.year(), dt.month(), dt.day()), (2014, 11, 28));\nassert_eq!((dt.month0(), dt.day0()), (10, 27)); // for unfortunate souls\nassert_eq!((dt.hour(), dt.minute(), dt.second()), (21, 45, 59));\nassert_eq!(dt.weekday(), Weekday::Fri);\nassert_eq!(dt.weekday().number_from_monday(), 5); // Mon=1, ..., Sun=7\nassert_eq!(dt.ordinal(), 332); // the day of year\nassert_eq!(dt.num_days_from_ce(), 735565); // the number of days from and including Jan 1, 1\n\n// time zone accessor and manipulation\nassert_eq!(dt.offset().fix().local_minus_utc(), 9 * 3600);\nassert_eq!(dt.timezone(), FixedOffset::east(9 * 3600));\nassert_eq!(dt.with_timezone(&Utc), Utc.ymd(2014, 11, 28).and_hms_nano(12, 45, 59, 324310806));\n\n// a sample of property manipulations (validates dynamically)\nassert_eq!(dt.with_day(29).unwrap().weekday(), Weekday::Sat); // 2014-11-29 is Saturday\nassert_eq!(dt.with_day(32), None);\nassert_eq!(dt.with_year(-300).unwrap().num_days_from_ce(), -109606); // November 29, 301 BCE\n\n// arithmetic operations\nlet dt1 = Utc.ymd(2014, 11, 14).and_hms(8, 9, 10);\nlet dt2 = Utc.ymd(2014, 11, 14).and_hms(10, 9, 8);\nassert_eq!(dt1.signed_duration_since(dt2), Duration::seconds(-2 * 3600 + 2));\nassert_eq!(dt2.signed_duration_since(dt1), Duration::seconds(2 * 3600 - 2));\nassert_eq!(Utc.ymd(1970, 1, 1).and_hms(0, 0, 0) + Duration::seconds(1_000_000_000),\n Utc.ymd(2001, 9, 9).and_hms(1, 46, 40));\nassert_eq!(Utc.ymd(1970, 1, 1).and_hms(0, 0, 0) - Duration::seconds(1_000_000_000),\n Utc.ymd(1938, 4, 24).and_hms(22, 13, 20));\n```\n\n### Formatting and Parsing\n\nFormatting is done via the [`format`](./struct.DateTime.html#method.format) method,\nwhich format is equivalent to the familiar `strftime` format.\n\nSee [`format::strftime`](./format/strftime/index.html#specifiers)\ndocumentation for full syntax and list of specifiers.\n\nThe default `to_string` method and `{:?}` specifier also give a reasonable representation.\nChrono also provides [`to_rfc2822`](./struct.DateTime.html#method.to_rfc2822) and\n[`to_rfc3339`](./struct.DateTime.html#method.to_rfc3339) methods\nfor well-known formats.\n\nChrono now also provides date formatting in almost any language without the\nhelp of an additional C library. This functionality is under the feature\n`unstable-locales`:\n\n```text\nchrono { version = \"0.4\", features = [\"unstable-locales\"]\n```\n\nThe `unstable-locales` feature requires and implies at least the `alloc` feature.\n\n```rust\nuse chrono::prelude::*;\n\nlet dt = Utc.ymd(2014, 11, 28).and_hms(12, 0, 9);\nassert_eq!(dt.format(\"%Y-%m-%d %H:%M:%S\").to_string(), \"2014-11-28 12:00:09\");\nassert_eq!(dt.format(\"%a %b %e %T %Y\").to_string(), \"Fri Nov 28 12:00:09 2014\");\nassert_eq!(dt.format_localized(\"%A %e %B %Y, %T\", Locale::fr_BE).to_string(), \"vendredi 28 novembre 2014, 12:00:09\");\nassert_eq!(dt.format(\"%a %b %e %T %Y\").to_string(), dt.format(\"%c\").to_string());\n\nassert_eq!(dt.to_string(), \"2014-11-28 12:00:09 UTC\");\nassert_eq!(dt.to_rfc2822(), \"Fri, 28 Nov 2014 12:00:09 +0000\");\nassert_eq!(dt.to_rfc3339(), \"2014-11-28T12:00:09+00:00\");\nassert_eq!(format!(\"{:?}\", dt), \"2014-11-28T12:00:09Z\");\n\n// Note that milli/nanoseconds are only printed if they are non-zero\nlet dt_nano = Utc.ymd(2014, 11, 28).and_hms_nano(12, 0, 9, 1);\nassert_eq!(format!(\"{:?}\", dt_nano), \"2014-11-28T12:00:09.000000001Z\");\n```\n\nParsing can be done with three methods:\n\n1. The standard [`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait\n (and [`parse`](https://doc.rust-lang.org/std/primitive.str.html#method.parse) method\n on a string) can be used for parsing `DateTime<FixedOffset>`, `DateTime<Utc>` and\n `DateTime<Local>` values. This parses what the `{:?}`\n ([`std::fmt::Debug`](https://doc.rust-lang.org/std/fmt/trait.Debug.html))\n format specifier prints, and requires the offset to be present.\n\n2. [`DateTime::parse_from_str`](./struct.DateTime.html#method.parse_from_str) parses\n a date and time with offsets and returns `DateTime<FixedOffset>`.\n This should be used when the offset is a part of input and the caller cannot guess that.\n It *cannot* be used when the offset can be missing.\n [`DateTime::parse_from_rfc2822`](./struct.DateTime.html#method.parse_from_rfc2822)\n and\n [`DateTime::parse_from_rfc3339`](./struct.DateTime.html#method.parse_from_rfc3339)\n are similar but for well-known formats.\n\n3. [`Offset::datetime_from_str`](./offset/trait.TimeZone.html#method.datetime_from_str) is\n similar but returns `DateTime` of given offset.\n When the explicit offset is missing from the input, it simply uses given offset.\n It issues an error when the input contains an explicit offset different\n from the current offset.\n\nMore detailed control over the parsing process is available via\n[`format`](./format/index.html) module.\n\n```rust\nuse chrono::prelude::*;\n\nlet dt = Utc.ymd(2014, 11, 28).and_hms(12, 0, 9);\nlet fixed_dt = dt.with_timezone(&FixedOffset::east(9*3600));\n\n// method 1\nassert_eq!(\"2014-11-28T12:00:09Z\".parse::<DateTime<Utc>>(), Ok(dt.clone()));\nassert_eq!(\"2014-11-28T21:00:09+09:00\".parse::<DateTime<Utc>>(), Ok(dt.clone()));\nassert_eq!(\"2014-11-28T21:00:09+09:00\".parse::<DateTime<FixedOffset>>(), Ok(fixed_dt.clone()));\n\n// method 2\nassert_eq!(DateTime::parse_from_str(\"2014-11-28 21:00:09 +09:00\", \"%Y-%m-%d %H:%M:%S %z\"),\n Ok(fixed_dt.clone()));\nassert_eq!(DateTime::parse_from_rfc2822(\"Fri, 28 Nov 2014 21:00:09 +0900\"),\n Ok(fixed_dt.clone()));\nassert_eq!(DateTime::parse_from_rfc3339(\"2014-11-28T21:00:09+09:00\"), Ok(fixed_dt.clone()));\n\n// method 3\nassert_eq!(Utc.datetime_from_str(\"2014-11-28 12:00:09\", \"%Y-%m-%d %H:%M:%S\"), Ok(dt.clone()));\nassert_eq!(Utc.datetime_from_str(\"Fri Nov 28 12:00:09 2014\", \"%a %b %e %T %Y\"), Ok(dt.clone()));\n\n// oops, the year is missing!\nassert!(Utc.datetime_from_str(\"Fri Nov 28 12:00:09\", \"%a %b %e %T %Y\").is_err());\n// oops, the format string does not include the year at all!\nassert!(Utc.datetime_from_str(\"Fri Nov 28 12:00:09\", \"%a %b %e %T\").is_err());\n// oops, the weekday is incorrect!\nassert!(Utc.datetime_from_str(\"Sat Nov 28 12:00:09 2014\", \"%a %b %e %T %Y\").is_err());\n```\n\nAgain : See [`format::strftime`](./format/strftime/index.html#specifiers)\ndocumentation for full syntax and list of specifiers.\n\n### Conversion from and to EPOCH timestamps\n\nUse [`Utc.timestamp(seconds, nanoseconds)`](./offset/trait.TimeZone.html#method.timestamp)\nto construct a [`DateTime<Utc>`](./struct.DateTime.html) from a UNIX timestamp\n(seconds, nanoseconds that passed since January 1st 1970).\n\nUse [`DateTime.timestamp`](./struct.DateTime.html#method.timestamp) to get the timestamp (in seconds)\nfrom a [`DateTime`](./struct.DateTime.html). Additionally, you can use\n[`DateTime.timestamp_subsec_nanos`](./struct.DateTime.html#method.timestamp_subsec_nanos)\nto get the number of additional number of nanoseconds.\n\n```rust\n// We need the trait in scope to use Utc::timestamp().\nuse chrono::{DateTime, TimeZone, Utc};\n\n// Construct a datetime from epoch:\nlet dt = Utc.timestamp(1_500_000_000, 0);\nassert_eq!(dt.to_rfc2822(), \"Fri, 14 Jul 2017 02:40:00 +0000\");\n\n// Get epoch value from a datetime:\nlet dt = DateTime::parse_from_rfc2822(\"Fri, 14 Jul 2017 02:40:00 +0000\").unwrap();\nassert_eq!(dt.timestamp(), 1_500_000_000);\n```\n\n### Individual date\n\nChrono also provides an individual date type ([**`Date`**](./struct.Date.html)).\nIt also has time zones attached, and have to be constructed via time zones.\nMost operations available to `DateTime` are also available to `Date` whenever appropriate.\n\n```rust\nuse chrono::prelude::*;\nuse chrono::offset::LocalResult;\n\nassert_eq!(Utc::today(), Utc::now().date());\nassert_eq!(Local::today(), Local::now().date());\n\nassert_eq!(Utc.ymd(2014, 11, 28).weekday(), Weekday::Fri);\nassert_eq!(Utc.ymd_opt(2014, 11, 31), LocalResult::None);\nassert_eq!(Utc.ymd(2014, 11, 28).and_hms_milli(7, 8, 9, 10).format(\"%H%M%S\").to_string(),\n \"070809\");\n```\n\nThere is no timezone-aware `Time` due to the lack of usefulness and also the complexity.\n\n`DateTime` has [`date`](./struct.DateTime.html#method.date) method\nwhich returns a `Date` which represents its date component.\nThere is also a [`time`](./struct.DateTime.html#method.time) method,\nwhich simply returns a naive local time described below.\n\n### Naive date and time\n\nChrono provides naive counterparts to `Date`, (non-existent) `Time` and `DateTime`\nas [**`NaiveDate`**](./naive/struct.NaiveDate.html),\n[**`NaiveTime`**](./naive/struct.NaiveTime.html) and\n[**`NaiveDateTime`**](./naive/struct.NaiveDateTime.html) respectively.\n\nThey have almost equivalent interfaces as their timezone-aware twins,\nbut are not associated to time zones obviously and can be quite low-level.\nThey are mostly useful for building blocks for higher-level types.\n\nTimezone-aware `DateTime` and `Date` types have two methods returning naive versions:\n[`naive_local`](./struct.DateTime.html#method.naive_local) returns\na view to the naive local time,\nand [`naive_utc`](./struct.DateTime.html#method.naive_utc) returns\na view to the naive UTC time.\n\n## Limitations\n\nOnly proleptic Gregorian calendar (i.e. extended to support older dates) is supported.\nBe very careful if you really have to deal with pre-20C dates, they can be in Julian or others.\n\nDate types are limited in about +/- 262,000 years from the common epoch.\nTime types are limited in the nanosecond accuracy.\n\n[Leap seconds are supported in the representation but\nChrono doesn't try to make use of them](./naive/struct.NaiveTime.html#leap-second-handling).\n(The main reason is that leap seconds are not really predictable.)\nAlmost *every* operation over the possible leap seconds will ignore them.\nConsider using `NaiveDateTime` with the implicit TAI (International Atomic Time) scale\nif you want.\n\nChrono inherently does not support an inaccurate or partial date and time representation.\nAny operation that can be ambiguous will return `None` in such cases.\nFor example, \"a month later\" of 2014-01-30 is not well-defined\nand consequently `Utc.ymd(2014, 1, 30).with_month(2)` returns `None`.\n\nNon ISO week handling is not yet supported.\nFor now you can use the [chrono_ext](https://crates.io/crates/chrono_ext)\ncrate ([sources](https://github.com/bcourtine/chrono-ext/)).\n\nAdvanced time zone handling is not yet supported.\nFor now you can try the [Chrono-tz](https://github.com/chronotope/chrono-tz/) crate instead.\nAny weekday can be represented as an integer from 0 to 6, which equals to\n[`Weekday::num_days_from_monday`](#method.num_days_from_monday) in this implementation.\nDo not heavily depend on this though; use explicit methods whenever possible."},"filterText":"chrono"},{"label":"tide","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"tide"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"Tide is a minimal and pragmatic Rust web application framework built for\nrapid development. It comes with a robust set of features that make\nbuilding async web applications and APIs easier and more fun.\n\n# Getting started\n\nIn order to build a web app in Rust you need an HTTP server, and an async\nruntime. After running `cargo init` add the following lines to your\n`Cargo.toml` file:\n\n```toml\n# Example, use the version numbers you need\ntide = \"0.14.0\"\nasync-std = { version = \"1.6.0\", features = [\"attributes\"] }\nserde = { version = \"1.0\", features = [\"derive\"] }\n```\n\n# Examples\n\nCreate an HTTP server that receives a JSON body, validates it, and responds with a\nconfirmation message.\n\n```rust\nuse tide::Request;\nuse tide::prelude::*;\n\n#[derive(Debug, Deserialize)]\nstruct Animal {\n name: String,\n legs: u8,\n}\n\n#[async_std::main]\nasync fn main() -> tide::Result<()> {\n let mut app = tide::new();\n app.at(\"/orders/shoes\").post(order_shoes);\n app.listen(\"127.0.0.1:8080\").await?;\n Ok(())\n}\n\nasync fn order_shoes(mut req: Request<()>) -> tide::Result {\n let Animal { name, legs } = req.body_json().await?;\n Ok(format!(\"Hello, {}! I've put in an order for {} shoes\", name, legs).into())\n}\n````\n\n```sh\n$ curl localhost:8080/orders/shoes -d '{ \"name\": \"Chashu\", \"legs\": 4 }'\nHello, Chashu! I've put in an order for 4 shoes\n\n$ curl localhost:8080/orders/shoes -d '{ \"name\": \"Mary Millipede\", \"legs\": 750 }'\nnumber too large to fit in target type\n```\nSee more examples in the [examples](https://github.com/http-rs/tide/tree/main/examples) directory."},"filterText":"tide"},{"label":"dotenv","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"dotenv"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"This crate provides a configuration loader in the style of the [ruby dotenv\ngem](https://github.com/bkeepers/dotenv). This library is meant to be used\non development or testing environments in which setting environment\nvariables is not practical. It loads environment variables from a .env\nfile, if available, and mashes those with the actual environment variables\nprovided by the operating system."},"filterText":"dotenv"},{"label":"anyhow","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"anyhow"},"additionalTextEdits":[],"deprecated":false,"kind":9,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"[![github]](https://github.com/dtolnay/anyhow)&ensp;[![crates-io]](https://crates.io/crates/anyhow)&ensp;[![docs-rs]](https://docs.rs/anyhow)\n\n[github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github\n[crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust\n[docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K\n\n<br>\n\nThis library provides [`anyhow::Error`][Error], a trait object based error\ntype for easy idiomatic error handling in Rust applications.\n\n<br>\n\n# Details\n\n- Use `Result<T, anyhow::Error>`, or equivalently `anyhow::Result<T>`, as\n the return type of any fallible function.\n\n Within the function, use `?` to easily propagate any error that implements\n the `std::error::Error` trait.\n\n ```\n # pub trait Deserialize {}\n #\n # mod serde_json {\n # use super::Deserialize;\n # use std::io;\n #\n # pub fn from_str<T: Deserialize>(json: &str) -> io::Result<T> {\n # unimplemented!()\n # }\n # }\n #\n # struct ClusterMap;\n #\n # impl Deserialize for ClusterMap {}\n #\n use anyhow::Result;\n\n fn get_cluster_info() -> Result<ClusterMap> {\n let config = std::fs::read_to_string(\"cluster.json\")?;\n let map: ClusterMap = serde_json::from_str(&config)?;\n Ok(map)\n }\n #\n # fn main() {}\n ```\n\n- Attach context to help the person troubleshooting the error understand\n where things went wrong. A low-level error like \"No such file or\n directory\" can be annoying to debug without more context about what higher\n level step the application was in the middle of.\n\n ```\n # struct It;\n #\n # impl It {\n # fn detach(&self) -> Result<()> {\n # unimplemented!()\n # }\n # }\n #\n use anyhow::{Context, Result};\n\n fn main() -> Result<()> {\n # return Ok(());\n #\n # const _: &str = stringify! {\n ...\n # };\n #\n # let it = It;\n # let path = \"./path/to/instrs.json\";\n #\n it.detach().context(\"Failed to detach the important thing\")?;\n\n let content = std::fs::read(path)\n .with_context(|| format!(\"Failed to read instrs from {}\", path))?;\n #\n # const _: &str = stringify! {\n ...\n # };\n #\n # Ok(())\n }\n ```\n\n ```console\n Error: Failed to read instrs from ./path/to/instrs.json\n\n Caused by:\n No such file or directory (os error 2)\n ```\n\n- Downcasting is supported and can be by value, by shared reference, or by\n mutable reference as needed.\n\n ```\n # use anyhow::anyhow;\n # use std::fmt::{self, Display};\n # use std::task::Poll;\n #\n # #[derive(Debug)]\n # enum DataStoreError {\n # Censored(()),\n # }\n #\n # impl Display for DataStoreError {\n # fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {\n # unimplemented!()\n # }\n # }\n #\n # impl std::error::Error for DataStoreError {}\n #\n # const REDACTED_CONTENT: () = ();\n #\n # let error = anyhow!(\"...\");\n # let root_cause = &error;\n #\n # let ret =\n // If the error was caused by redaction, then return a\n // tombstone instead of the content.\n match root_cause.downcast_ref::<DataStoreError>() {\n Some(DataStoreError::Censored(_)) => Ok(Poll::Ready(REDACTED_CONTENT)),\n None => Err(error),\n }\n # ;\n ```\n\n- If using the nightly channel, a backtrace is captured and printed with the\n error if the underlying error type does not already provide its own. In\n order to see backtraces, they must be enabled through the environment\n variables described in [`std::backtrace`]:\n\n - If you want panics and errors to both have backtraces, set\n `RUST_BACKTRACE=1`;\n - If you want only errors to have backtraces, set `RUST_LIB_BACKTRACE=1`;\n - If you want only panics to have backtraces, set `RUST_BACKTRACE=1` and\n `RUST_LIB_BACKTRACE=0`.\n\n The tracking issue for this feature is [rust-lang/rust#53487].\n\n [`std::backtrace`]: https://doc.rust-lang.org/std/backtrace/index.html#environment-variables\n [rust-lang/rust#53487]: https://github.com/rust-lang/rust/issues/53487\n\n- Anyhow works with any error type that has an impl of `std::error::Error`,\n including ones defined in your crate. We do not bundle a `derive(Error)`\n macro but you can write the impls yourself or use a standalone macro like\n [thiserror].\n\n [thiserror]: https://github.com/dtolnay/thiserror\n\n ```\n use thiserror::Error;\n\n #[derive(Error, Debug)]\n pub enum FormatError {\n #[error(\"Invalid header (expected {expected:?}, got {found:?})\")]\n InvalidHeader {\n expected: String,\n found: String,\n },\n #[error(\"Missing attribute: {0}\")]\n MissingAttribute(String),\n }\n ```\n\n- One-off error messages can be constructed using the `anyhow!` macro, which\n supports string interpolation and produces an `anyhow::Error`.\n\n ```\n # use anyhow::{anyhow, Result};\n #\n # fn demo() -> Result<()> {\n # let missing = \"...\";\n return Err(anyhow!(\"Missing attribute: {}\", missing));\n # Ok(())\n # }\n ```\n\n A `bail!` macro is provided as a shorthand for the same early return.\n\n ```\n # use anyhow::{bail, Result};\n #\n # fn demo() -> Result<()> {\n # let missing = \"...\";\n bail!(\"Missing attribute: {}\", missing);\n # Ok(())\n # }\n ```\n\n<br>\n\n# No-std support\n\nIn no_std mode, the same API is almost all available and works the same way.\nTo depend on Anyhow in no_std mode, disable our default enabled \"std\"\nfeature in Cargo.toml. A global allocator is required.\n\n```toml\n[dependencies]\nanyhow = { version = \"1.0\", default-features = false }\n```\n\nSince the `?`-based error conversions would normally rely on the\n`std::error::Error` trait which is only available through std, no_std mode\nwill require an explicit `.map_err(Error::msg)` when working with a\nnon-Anyhow error type inside a function that returns Anyhow's error type."},"filterText":"anyhow"},{"label":"u32","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"u32"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"u32"},{"label":"bool","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"bool"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"bool"},{"label":"u8","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"u8"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"u8"},{"label":"isize","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"isize"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"isize"},{"label":"u16","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"u16"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"u16"},{"label":"u64","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"u64"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"u64"},{"label":"u128","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"u128"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"u128"},{"label":"f32","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"f32"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"f32"},{"label":"i128","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"i128"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"i128"},{"label":"i16","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"i16"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"i16"},{"label":"str","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"str"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"str"},{"label":"i64","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"i64"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"i64"},{"label":"char","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"char"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"char"},{"label":"f64","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"f64"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"f64"},{"label":"i32","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"i32"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"i32"},{"label":"i8","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"i8"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"i8"},{"label":"usize","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"usize"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"filterText":"usize"},{"label":"AsMut","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"AsMut"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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[`Option<T>`]: Option\n[`Result<T, E>`]: Result\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"},"filterText":"AsMut"},{"label":"RustcDecodable","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"RustcDecodable"},"additionalTextEdits":[],"deprecated":false,"kind":18,"insertTextFormat":1,"filterText":"RustcDecodable"},{"label":"cfg_accessible","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"cfg_accessible"},"additionalTextEdits":[],"deprecated":false,"kind":18,"insertTextFormat":1,"filterText":"cfg_accessible"},{"label":"Debug!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"Debug!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Debug!($0)"},"detail":"pub macro Debug"},{"label":"From","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"From"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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 simplifies 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[`Option<T>`]: Option\n[`Result<T, E>`]: Result\n[`String`]: ../../std/string/struct.String.html\n[`from`]: From::from\n[book]: ../../book/ch09-00-error-handling.html"},"filterText":"From"},{"label":"test_case","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"test_case"},"additionalTextEdits":[],"deprecated":false,"kind":18,"insertTextFormat":1,"filterText":"test_case"},{"label":"Unpin","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Unpin"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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"},"filterText":"Unpin"},{"label":"FnMut","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"FnMut"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"documentation":{"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]: ../../std/primitive.fn.html\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```"},"filterText":"FnMut"},{"label":"Extend","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Extend"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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```"},"filterText":"Extend"},{"label":"PartialEq","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"PartialEq"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"Trait for equality comparisons which are [partial equivalence\nrelations](https://en.wikipedia.org/wiki/Partial_equivalence_relation).\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 [`Eq`].\n\nFormally, the equality must be (for all `a`, `b` and `c`):\n\n- symmetric: `a == b` implies `b == a`; and\n- transitive: `a == b` and `b == c` implies `a == c`.\n\nNote that these requirements mean that the trait itself must be implemented\nsymmetrically and transitively: if `T: PartialEq<U>` and `U: PartialEq<V>`\nthen `U: PartialEq<T>` and `T: PartialEq<V>`.\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\n`PartialEq` only requires the [`eq`] method to be implemented; [`ne`] is defined\nin terms of it by default. Any manual implementation of [`ne`] *must* respect\nthe rule that [`eq`] is a strict inverse of [`ne`]; that is, `!(a == b)` if and\nonly if `a != b`.\n\nImplementations of `PartialEq`, [`PartialOrd`], and [`Ord`] *must* agree with\neach other. It's easy to accidentally make them disagree by deriving some\nof the traits and manually implementing others.\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 `PartialEq<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"},"filterText":"PartialEq"},{"label":"PartialEq!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"PartialEq!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"PartialEq!($0)"},"detail":"pub macro PartialEq"},{"label":"RustcEncodable","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"RustcEncodable"},"additionalTextEdits":[],"deprecated":false,"kind":18,"insertTextFormat":1,"filterText":"RustcEncodable"},{"label":"test","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"test"},"additionalTextEdits":[],"deprecated":false,"kind":18,"insertTextFormat":1,"filterText":"test"},{"label":"Drop","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Drop"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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 the all 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 prevents 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 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."},"filterText":"Drop"},{"label":"None","insertTextFormat":1,"additionalTextEdits":[],"deprecated":false,"kind":20,"filterText":"None","documentation":{"kind":"markdown","value":"No value"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"None"},"detail":"()"},{"label":"ToString","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"ToString"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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"},"filterText":"ToString"},{"label":"drop(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"command":{"title":"triggerParameterHints","command":"editor.action.triggerParameterHints"},"kind":3,"filterText":"drop","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"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"drop(${1:x})$0"},"detail":"-> ()"},{"label":"PartialOrd","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"PartialOrd"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"Trait for values that can be compared for a sort-order.\n\nThe comparison must satisfy, for all `a`, `b` and `c`:\n\n- asymmetry: if `a < b` then `!(a > b)`, as well as `a > b` implying `!(a < b)`; and\n- transitivity: `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.\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## Derivable\n\nThis trait can be used with `#[derive]`. When `derive`d on structs, it will produce a\nlexicographic ordering based on the top-to-bottom declaration order of the struct's members.\nWhen `derive`d on enums, variants are ordered by their top-to-bottom discriminant order.\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\nImplementations of [`PartialEq`], `PartialOrd`, and [`Ord`] *must* agree with each other. It's\neasy to accidentally make them disagree by deriving some of the traits and manually\nimplementing others.\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 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"},"filterText":"PartialOrd"},{"label":"PartialOrd!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"PartialOrd!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"PartialOrd!($0)"},"detail":"pub macro PartialOrd"},{"label":"Option","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Option"},"additionalTextEdits":[],"deprecated":false,"kind":13,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"The `Option` type. See [the module level documentation](self) for more."},"filterText":"Option"},{"label":"bench","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"bench"},"additionalTextEdits":[],"deprecated":false,"kind":18,"insertTextFormat":1,"filterText":"bench"},{"label":"global_allocator","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"global_allocator"},"additionalTextEdits":[],"deprecated":false,"kind":18,"insertTextFormat":1,"filterText":"global_allocator"},{"label":"Copy","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Copy"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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\nstruct 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* Array types, for all sizes, if the item type also implements `Copy` (e.g., `[i32; 123456]`)\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"},"filterText":"Copy"},{"label":"Copy!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"Copy!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Copy!($0)"},"detail":"pub macro Copy"},{"label":"String","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"String"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"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```compile_fail,E0277\nlet s = \"hello\";\n\nprintln!(\"The first letter of s is {}\", s[0]); // ERROR!!!\n```\n\n[`OsString`]: ../../std/ffi/struct.OsString.html\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`s implement [`Deref`]`<Target=str>`, and so inherit 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```compile_fail,E0277\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`][`&str`], then referencing the [`str`][`&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\n[`&str`]: prim@str\n[`Deref`]: core::ops::Deref\n[`as_str()`]: String::as_str"},"filterText":"String"},{"label":"Eq","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Eq"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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\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```"},"filterText":"Eq"},{"label":"Eq!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"Eq!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Eq!($0)"},"detail":"pub macro Eq"},{"label":"Into","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Into"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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[`Option<T>`]: Option\n[`Result<T, E>`]: Result\n[`String`]: ../../std/string/struct.String.html\n[`Vec`]: ../../std/vec/struct.Vec.html"},"filterText":"Into"},{"label":"Clone","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Clone"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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 extremely inexpensive, 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, `#[derive]` 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* Array types, for all sizes, if the item type also implements `Clone` (e.g., `[i32; 123456]`)\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"},"filterText":"Clone"},{"label":"Clone!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"Clone!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Clone!($0)"},"detail":"pub macro Clone"},{"label":"Result","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Result"},"additionalTextEdits":[],"deprecated":false,"kind":13,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"`Result` is a type that represents either success ([`Ok`]) or failure ([`Err`]).\n\nSee the [module documentation](self) for details."},"filterText":"Result"},{"label":"Box","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Box"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"A pointer type for heap allocation.\n\nSee the [module-level documentation](../../std/boxed/index.html) for more."},"filterText":"Box"},{"label":"ExactSizeIterator","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"ExactSizeIterator"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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\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```"},"filterText":"ExactSizeIterator"},{"label":"Ok(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"command":{"title":"triggerParameterHints","command":"editor.action.triggerParameterHints"},"kind":20,"filterText":"Ok","documentation":{"kind":"markdown","value":"Contains the success value"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Ok($0)"},"detail":"(T)"},{"label":"AsRef","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"AsRef"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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.\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[`Option<T>`]: Option\n[`Result<T, E>`]: Result\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```"},"filterText":"AsRef"},{"label":"Iterator","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Iterator"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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"},"filterText":"Iterator"},{"label":"Ord","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Ord"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"Trait for types that form a [total order](https://en.wikipedia.org/wiki/Total_order).\n\nAn order is a total order if it is (for all `a`, `b` and `c`):\n\n- total and asymmetric: exactly one of `a < b`, `a == b` or `a > b` is true; and\n- 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]`. When `derive`d on structs, it will produce a\n[lexicographic](https://en.wikipedia.org/wiki/Lexicographic_order) ordering based on the top-to-bottom declaration order of the struct's members.\nWhen `derive`d on enums, variants are ordered by their top-to-bottom discriminant order.\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\nImplementations of [`PartialEq`], [`PartialOrd`], and `Ord` *must*\nagree with each other. That is, `a.cmp(b) == Ordering::Equal` if\nand only if `a == b` and `Some(a.cmp(b)) == a.partial_cmp(b)` for\nall `a` and `b`. It's easy to accidentally make them disagree by\nderiving some of the traits and manually implementing others.\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"},"filterText":"Ord"},{"label":"Ord!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"Ord!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Ord!($0)"},"detail":"pub macro Ord"},{"label":"Hash!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"Hash!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Hash!($0)"},"detail":"pub macro Hash"},{"label":"ToOwned","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"ToOwned"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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."},"filterText":"ToOwned"},{"label":"Vec","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Vec"},"additionalTextEdits":[],"deprecated":false,"kind":22,"insertTextFormat":1,"documentation":{"kind":"markdown","value":"A contiguous growable array type, written `Vec<T>` but pronounced '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 to make initialization more convenient:\n\n```rust\nlet mut vec = vec![1, 2, 3];\nvec.push(4);\nassert_eq!(vec, [1, 2, 3, 4]);\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 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. Slices, on the other hand, are read-only objects.\nTo get a [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 may 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` may not report a [`capacity`] of 0*. `Vec` will allocate if and only\nif [`mem::size_of::<T>`]`() * capacity() > 0`. In general, `Vec`'s allocation\ndetails are very subtle &mdash; 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 [`capacity`]` -\n`[`len`] logically uninitialized, contiguous elements.\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`].\n\n[`push`] and [`insert`] will never (re)allocate if the reported capacity is\nsufficient. [`push`] and [`insert`] *will* (re)allocate if\n[`len`]` == `[`capacity`]. 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 [`len`]` == `[`capacity`],\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 `Vec`. Even if you zero a `Vec`'s memory\nfirst, that may 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\n`Vec` does not currently 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[`capacity`]: Vec::capacity\n[`mem::size_of::<T>`]: core::mem::size_of\n[`len`]: Vec::len\n[`push`]: Vec::push\n[`insert`]: Vec::insert\n[`reserve`]: Vec::reserve\n[owned slice]: Box\n[slice]: ../../std/primitive.slice.html\n[`&`]: ../../std/primitive.reference.html"},"filterText":"Vec"},{"label":"Fn","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Fn"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"documentation":{"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]: ../../std/primitive.fn.html\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```"},"filterText":"Fn"},{"label":"IntoIterator","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"IntoIterator"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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 = vec![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```"},"filterText":"IntoIterator"},{"label":"Default","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Default"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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```"},"filterText":"Default"},{"label":"Default!(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"kind":2,"filterText":"Default!","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Default!($0)"},"detail":"pub macro Default"},{"label":"Sized","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Sized"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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"},"filterText":"Sized"},{"label":"Sync","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Sync"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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 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"},"filterText":"Sync"},{"label":"DoubleEndedIterator","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"DoubleEndedIterator"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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```"},"filterText":"DoubleEndedIterator"},{"label":"Some(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"command":{"title":"triggerParameterHints","command":"editor.action.triggerParameterHints"},"kind":20,"filterText":"Some","documentation":{"kind":"markdown","value":"Some value `T`"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Some($0)"},"detail":"(T)"},{"label":"Err(…)","insertTextFormat":2,"additionalTextEdits":[],"deprecated":false,"command":{"title":"triggerParameterHints","command":"editor.action.triggerParameterHints"},"kind":20,"filterText":"Err","documentation":{"kind":"markdown","value":"Contains the error value"},"textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Err($0)"},"detail":"(E)"},{"label":"FnOnce","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"FnOnce"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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]: ../../std/primitive.fn.html\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```"},"filterText":"FnOnce"},{"label":"Send","textEdit":{"range":{"end":{"character":5,"line":32},"start":{"character":4,"line":32}},"newText":"Send"},"additionalTextEdits":[],"deprecated":false,"kind":8,"insertTextFormat":1,"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"},"filterText":"Send"}]}},"request":{"id":6,"jsonrpc":"2.0","method":"textDocument/completion","params":{"textDocument":{"uri":"file:///home/prabirshrestha/code/objstor/src/main.rs"},"position":{"character":5,"line":32}}}}]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment