You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: router.rs
    path of file: ./repos/pavex/libs/pavexc/src/compiler/analyses/user_components
    
    the code of the file until where you have to start completion: use std::collections::{BTreeMap, BTreeSet};

use anyhow::anyh
    
fn prefix_ends_with_capture(path: &str) -> Option<Capture> {
    // Prefixes, if not empty, **cannot** end with a `/`.
    // Therefore we will always get a `Some` from `split_last` and it won't be empty.
    let last_segment = path.split('/').last().unwrap();
    if let Some((_, param)) = last_segment.split_once(':') {
        Some(Capture::Parameter(param.to_owned()))
    } else if let Some((_, param)) = last_segment.split_once('*') {
        Some(Capture::CatchAll(param.to_owned()))
    } else {
        None
    }
}