Registry / testing / assert-matches

assert-matches

JSON →
library1.5.0rscratesunverified

Asserts that a value matches a pattern.

# Cargo.toml [dependencies] assert_matches = "1.5.0"
INSTALL
IMPORT
SIG · ASSERT-MATCHES
A
assert-matches
testingrustv1.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

assert_matches
use assert_matches::assert_matches;

Assert that a value matches a given pattern with optional guard.

use assert_matches::assert_matches; let value = Some(42); assert_matches!(value, Some(x) if x > 0); println!("Pattern matched!");
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.5.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
assert-matches — cargo add assert-matches · libregistry