Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
quickwit.io
...The query parser already supports this feature, for instance "quickwit tan"* will match documents containing "quickwit tantivy" and "quickwit tango".Regex tokenizer: Tokenization based on regex patterns.Coerce option: Convert values instead of returning an error during indexing.Slop in phrase queries supports now transpositions. "quickwit tantivy"~2 will match...
Project/Tooling Updates 2023-06-21 ~2 min read
rust-analyzer.github.io
#11869 (first contribution) allow tildes as code block fences: #11866 (first contribution) avoid underflows in range conversion. #11857, #11886 decrease relevance of postfix completions. #11840 fix another const generic panic. #11842 fix duplicate type mismatches with blocks. #11844 fix divergence detection for bare match arms. #11852 expand asm! to infinite...
Project/Tooling Updates 2022-04-06 ~1 min read
rust-analyzer.github.io
...the augmentsSyntaxTokens capability on VS Code. #14802 fix layout for hir_ty::Ty and friends. #14820 expand format_args! with more details. #14851 handle match scrutinee in closure captures. #14855 consider block impls in lookup_impl_assoc_item_for_trait_ref. #14863 consider all tokens in macro calls when analyzing...
Project/Tooling Updates 2023-05-24 ~1 min read
gitlab.com
...Cursor Position Cursor {Up, Down, Forward, Backward} Cursor {Save, Restore} Erase Display Erase Line Set Graphics mode Set/Reset Text Mode Usage let text = "\x1b[31;1;4mHello World\x1b[0m"; for e in parse_ansi(text) { match e.kind() { ElementKind::Text => { println!("Got a text: {:?}", &text[e.range()],); } _ => { println...
Crate v0.3.0 2025-01-30
doc.rust-lang.org
pub fn contains_key<Q>(&self, key: &Q) -> bool
...The key may be any borrowed form of the map's key type, but the ordering on the borrowed form must match the ordering on the key type. Examples use std::collections::BTreeMap; let mut map = BTreeMap::new(); map.insert(1, "a"); assert_eq!(map.contains_key(&1), true); assert...
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub macro ready!
...let num = match fut.poll(cx) { Poll::Ready(t) => t, Poll::Pending => return Poll::Pending, };
macro core Stable since 1.64.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn contains_key<Q>(&self, k: &Q) -> bool
...The key may be any borrowed form of the map's key type, but Hash and Eq on the borrowed form must match those for the key type. Examples use std::collections::HashMap; let mut map = HashMap::new(); map.insert(1, "a"); assert_eq!(map.contains_key(&1), true); assert...
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn remove<Q>(&mut self, value: &Q) -> bool
...The value may be any borrowed form of the set's value type, but Hash and Eq on the borrowed form must match those for the value type. Examples use std::collections::HashSet; let mut set = HashSet::new(); set.insert(2); assert_eq!(set.remove(&2), true); assert_eq!(set...
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn accept(&self) -> io::Result<(UnixStream, SocketAddr)>
...Examples use std::os::unix::net::UnixListener; fn main() -> std::io::Result<()> { let listener = UnixListener::bind("/path/to/the/socket")?; match listener.accept() { Ok((socket, addr)) => println!("Got a client: {addr:?}"), Err(e) => println!("accept function failed: {e:?}"), } Ok(()) }
method std Stable since 1.10.0 Version 1.100.0-nightly
mortenvistisen.com
...Tera = { 10 let mut tera = match Tera::new("templates/**/*.html") { 11 Ok(t) => t, 12 Err(e) => { 13 println!("Parsing error(s): {}", e); 14 ::std::process::exit(1); 15 } 16 }; 17 tera.autoescape_on(vec![".html", ".sql"]); 18 tera 19 }; 20} 21 22pub fn start_blog(listener: TcpListener) -> Result<Server...
Rust Walkthroughs 2022-09-07 ~24 min read
docs.rs
...use konst::{ eq_str, option, result::unwrap_ctx, }; #[derive(Debug, PartialEq)] enum Direction { Forward, Backward, Left, Right, } impl Direction { const fn try_parse(input: &str) -> Result<Self, ParseDirectionError> { // As of Rust 1.65.0, string patterns don't work in const contexts match () { _ if eq_str(input, "forward") => Ok(Direction...
Crate v0.3.17 2026-04-16
www.ntietz.com
...It's just a big old match statement. We check the byte that's passed in and we return the appropriate value. pub fn parse_system_realtime(status_byte: u8) -> SystemRealtime { match status_byte { 0xf8 => SystemRealtime::Clock, 0xf9 => SystemRealtime::Tick, 0xfa => SystemRealtime::Start, 0xfb => SystemRealtime::Continue, 0xfc => SystemRealtime::Stop, 0xfe...
Rust Walkthroughs 2024-12-11 ~16 min read
docs.rs
...Making API calls The following will execute a POST request to /_search?allow_no_indices=true with a JSON body of {"query":{"match_all":{}}} use elasticsearch::{Elasticsearch, Error, SearchParts}; use serde_json::{json, Value}; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let client = Elasticsearch::default(); // make...
Crate v8.19.0-alpha.1 2025-08-08
oxc.rs
...These 200 bytes have to be passed around, and also accessed every time we do a matches!(expr, Expression::Variant(_)) check, which is not very cache friendly for performance.So to make memory access efficient, it is best to box the enum variants.The perf-book describes additional info on...
Project/Tooling Updates 2024-10-09 ~18 min read
priver.dev
...Serialize>(t: &T) { let serialized = serde_json::to_string(t).unwrap(); println!("{}", serialized); } pub async fn new(db_url: &str) -> Result<Box<dyn DatabaseDriver>> { if db_url.starts_with("libsql") { let token = match config::database_token() { Ok(t) => t, Err(err) => bail!("{}", err), }; let client = match libsql::LibSQLDriver::new(db...
Rust Walkthroughs 2023-12-20 ~8 min read
guillaume-be.github.io
...A difference is made between the DAG nodes that do exist in the SentencePiece model (marked as leaves) and the nodes that do not have a matching. Every token is pushed by being added to the children of the token containing all characters except the last one: Get the characters...
News & Blog Posts 2020-06-10 ~19 min read
doc.rust-lang.org
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
...The key may be any borrowed form of the map's key type, but the ordering on the borrowed form must match the ordering on the key type. Examples use std::collections::BTreeMap; let mut map = BTreeMap::new(); map.insert(1, "a"); if let Some(x) = map.get_mut(&1...
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn align(&self) -> Option<Alignment>
...Examples use std::fmt::{self, Alignment}; struct Foo; impl fmt::Display for Foo { fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { let s = if let Some(s) = formatter.align() { match s { Alignment::Left => "left", Alignment::Right => "right", Alignment::Center => "center", } } else { "into the void" }; write!(formatter, "{s}") } } assert_eq...
method core Stable since 1.28.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut V>
...The key may be any borrowed form of the map's key type, but Hash and Eq on the borrowed form must match those for the key type. Examples use std::collections::HashMap; let mut map = HashMap::new(); map.insert(1, "a"); if let Some(x) = map.get_mut(&1...
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn _mm_set_ps(a: f32, b: f32, c: f32, d: f32) -> __m128
...This matches the standard way of writing bit patterns on x86: bit 127 .. 96 95 .. 64 63 .. 32 31 .. 0 +---------+---------+---------+---------+ | a | b | c | d | result +---------+---------+---------+---------+ Alternatively: let v = _mm_set_ps(d, c, b, a); Intel's documentation
function core Stable since 1.27.0 Version 1.100.0-nightly
"* Modular * Very high quality construction compared to its competitors * If you leave it lying around forget about it, stepping into a project is pain..."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.