Computing/Rust: Difference between revisions
From Cricalix.Net
(Created page with "Things I forget when doing new Rust installs, or other things I want to keep track of with Rust. # Install rust-analyzer via rustup. <code>rustup component add rust-analyzer</code> ==== Reqwest GET URIs ==== <syntaxhighlight lang="rust"> let mut req = client.get("https://www.google.com").build().unwrap(); let query: String = form_urlencoded::Serializer::new(String::new()) .append_key_only("foo") .finish(); req.url_mut().set_query(Some(&query)); </syntaxhighl...") |
(No difference)
|
Revision as of 17:02, 25 September 2023
Things I forget when doing new Rust installs, or other things I want to keep track of with Rust.
- Install rust-analyzer via rustup.
rustup component add rust-analyzer
Reqwest GET URIs
let mut req = client.get("https://www.google.com").build().unwrap();
let query: String = form_urlencoded::Serializer::new(String::new())
.append_key_only("foo")
.finish();
req.url_mut().set_query(Some(&query));
Clap for CLI handling
cargo add clap -F derive,env