docs.rs
A fast library for efficiently matching ignore files such as `.gitignore`
against file paths.
ignore The ignore crate provides a fast recursive directory iterator that respects various filters such as globs, file types and .gitignore files. This crate also provides lower level direct access to gitignore and file type matchers...
Crate
v0.4.35
2026-11-22
docs.rs
...server.expect( Expectation::matching(request::method_path("GET", "/foo")).respond_with(status_code(200)), ); // Configure the server to also receive between 1 and 3 POST /bar requests // with a json body matching {'foo': 'bar'}, and respond with a json body // {'result': 'success'} server.expect( Expectation::matching(all_of![ request::method...
Crate
v0.16.4
2026-01-06
crates.io
...use jiff::{ToSpan, Zoned}; use parse_datetime::{parse_datetime_at_date, ParsedDateTime}; let now = Zoned::now(); let after = parse_datetime_at_date(now.clone(), "+3 days"); match after.unwrap() { ParsedDateTime::InRange(z) => assert_eq!(now.checked_add(3.days()).unwrap(), z), ParsedDateTime::Extended(_) => unreachable!("unexpected for this input"), } For DateTime...
Crate
v0.18.0
2026-11-22
crates.io
...When the specified expectations do not match the received request, mock.assert() fails the test with a detailed error description, including a diff that shows the differences between the expected and actual HTTP requests. Example: 0 of 1 expected requests matched the mock specification. Here is a comparison with the...
Crate
v0.9.0
2026-10-20
docs.rs
...This is because reverse associations control the left side of a match arm rather than the right side. The function generated will match on a tuple containing all of the function arguments. Match arms will be ordered exactly as written from top to bottom with one exception: any wildcard pattern...
Crate
v1.4.2
2026-11-05
docs.rs
...If the output matches, the test passes, and if the output doesn't match the test fails. Note that it is also considered a failure if a test actually compiles successfully. To add a test: Create ui-tests/my-awesome-test.rs Write an invalid #[wasm_bindgen] invocation, testing the...
Crate
v0.2.130
2026-10-30
crates.io
...ExampleError) -> Self { solana_program_error::ProgramError::Custom(e as u32) } } impl solana_program_error::ToStr for ExampleError { fn to_str<E>(&self) -> &'static str { match self { ExampleError::MintHasNoMintAuthority => "Mint has no mint authority", ExampleError::IncorrectMintAuthority => "Incorrect mint authority has signed the instruction", } } }
Crate
v0.8.0
2025-08-11
crates.io
...Structured like an if-else chain, the first matching branch is the
item that gets emitted.
cfg-if Documentation A macro to ergonomically define an item depending on a large number of #[cfg] parameters. Structured like an if-else chain, the first matching branch is the item that gets emitted...
Crate
v1.0.5
2026-10-13
docs.rs
...use number_prefix::NumberPrefix; let amount = 8542_f32; let result = match NumberPrefix::decimal(amount) { NumberPrefix::Standalone(bytes) => { format!("The file is {} bytes in size", bytes) } NumberPrefix::Prefixed(prefix, n) => { format!("The file is {:.1} {}B in size", n, prefix) } }; assert_eq!("The file is 8.5 kB in size", result...
Crate
v0.4.0
2020-04-07
crates.io
...To be compatible, Zebra had to implement a special library, ed25519-zebra , to provide Zcash-flavored Ed25519, attempting to match libsodium 1.0.15 exactly. And the initial attempt to implement ed25519-zebra was also incompatible, because it precisely matched the wrong compile-time configuration of libsodium. This problem is...
Crate
v2.1.0
2023-01-23
docs.rs
...will be matched from the global root (prefix matches). All other paths will be matched as suffix matches. (=<boolean>) : Boolean values may be specified after a parameter, but if not, the value is assumed to be true by virtue of having listed the parameter. Usage with buf When used with...
Crate
v0.5.0
2025-11-30
crates.io
...type JsonArray = Vec<Box<Value>>; type JsonObject = HashMap<String,Box<Value>>; #[derive(Debug, Clone, PartialEq)] pub enum Value { Str(String), Num(f64), Bool(bool), Arr(JsonArray), Obj(JsonObject), Null } fn scan_json(scan: &mut Scanner) -> Result<Value,ScanError> { use Value::*; match scan.get() { Token::Str(s) => Ok(Str(s)), Token...
Crate
v0.2.0
2026-07-25
docs.rs
...It may need to match request headers specified in Vary . Even a matching fresh response may still not be usable if the new request restricted cacheability, etc. The key method is before_request(new_request) , which checks whether the new_request is compatible with the original request and whether all...
Crate
v3.0.0
2026-02-04
docs.rs
...will be matched from the global root (prefix matches). All other paths will be matched as suffix matches. (=<boolean>) : Boolean values may be specified after a parameter, but if not, the value is assumed to be true by virtue of having listed the parameter. Usage with protoc and protoc-gen...
Crate
v0.5.0
2025-11-30
crates.io
...In a regexp without the 'u' flag, these surrogate pairs are matched as distinct characters: const s = "😀"; const re = /./; const m = s.match(re); console.log(m); // returns \uD83D, high surrogate This behavior is almost never desired but is required by the ES spec. It's also super-awkward to...
Crate
v0.12.0
2026-08-23
github.com
A cross-platform font loading library font-kit font-kit provides a common interface to the various system font libraries and provides services such as finding fonts on the system, performing nearest-font matching, and rasterizing glyphs. Synopsis let font = SystemSource::new() .select_by_postscript_name("ArialMT") .unwrap() .load() .unwrap...
Crate
v0.14.3
2025-05-26
docs.rs
...Hamming Levenshtein - distance & normalized Optimal string alignment Damerau-Levenshtein - distance & normalized Jaro and Jaro-Winkler Sørensen-Dice The normalized versions return values between 0.0 and 1.0 , where 1.0 means an exact match. There are also generic versions of the functions for non-string inputs. Installation strsim is...
Crate
v0.11.1
2024-04-02
docs.rs
Rust library for approximate string matching Stringmetrics This is a Rust library for approximate string matching that implements simple algorithms such has Hamming distance, Levenshtein distance, Jaccard similarity, and more. Here are some useful quick links: Crate info: https://crates.io/crates/stringmetrics Crate docs: https://docs.rs/stringmetrics/ Python...
Crate
v2.2.2
2022-12-28
crates.io
...LanguageTag = "en-x-twain".parse().unwrap(); assert_eq!(langtag.primary_language(), "en"); assert_eq!(Vec::from_iter(langtag.private_use_subtags()), vec!["twain"]); You can check for equality, but more often you should test if two tags match. In this example we check if the resource in German language is...
Crate
v0.3.2
2021-05-24
docs.rs
Procedural macro for html5ever.
Crate
v0.35.0
2025-07-02