{"id":65298,"library":"assert-matches2","title":"Assert Matches2","description":"A version of the assert_matches! macro that brings variables from the pattern into scope.","status":"active","version":"0.1.2","language":"rust","source_language":null,"source_url":"https://codeberg.org/jplatte/assert_matches2","tags":["macro","testing","pattern-matching"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nassert_matches2 = \"0.1.2\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add assert_matches2","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"assert_matches","correct":"use assert_matches2::assert_matches;"}],"quickstart":{"code":"use assert_matches2::assert_matches;\n\nfn main() {\n    let value = Some(42);\n    assert_matches!(value, Some(x) => { println!(\"{}\", x); });\n}","lang":"rust","description":"Using assert_matches! to match and bind variables."},"warnings":[],"env_vars":null,"search_vec":"'assert':1,7 'bring':11 'macro':9,18 'match':8,22 'matches2':2 'pattern':15,21 'pattern-match':20 'scope':17 'test':19 'variabl':12 'version':4","created_at":"2026-06-17T17:08:25.061876+00:00","updated_at":"2026-06-17T17:08:25.061876+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://codeberg.org/jplatte/assert_matches2","github":null,"docs":"https://docs.rs/assert_matches2/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}