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: parsing.rs
    path of file: ./repos/zenoh/commons/zenoh-keyexpr/src/key_expr/format
    
    the code of the file until where you have to start completion: //
// Copyright (c) 2023 ZettaScale Technology
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
//
// Contributors:
//   ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//

use zenoh_result::{bail, ZResult};

use super::{IKeFormatStorage, KeFormat, Segment};
use crate::key_expr::keyexpr;

pub struct Parsed<'s, Storage: IKeFormatStorage<'s>> {
    format: &'s KeFormat<'s, Storage>,
    results: Storage::ValuesStorage<Option<&'s keyexpr>>,
}

impl<'s, Storage: IKeFormatStorage<'s>> Parsed<'s, Storage> {
    /// Access the `id` element.
    ///
    /// The returned string is guaranteed to either be an empty string or a valid key expression.
    ///
    /// # Errors
    /// If `id` is not part of `self`'s specs.
    pub fn get(&self, id: &str) -> ZResult<&'s str> {
        let Some(i)
    
fn parsing() {
    use crate::key_expr::OwnedKeyExpr;
    use core::convert::TryFrom;
    for a_spec in ["${a:*}", "a/${a:*}"] {
        for b_spec in ["b/${b:**}", "${b:**}"] {
            let specs = [a_spec, b_spec, "c"];
            for spec in [2, 3] {
                let spec = specs[..spec].join("/");
                let format: KeFormat<[Segment; 2]> = KeFormat::noalloc_new(&spec).unwrap();
                let mut formatter = format.formatter();
                for a_val in ["hi"] {
                    formatter.set("a", a_val).unwrap();
                    for b_val in ["hello", "hello/there", ""] {
                        formatter.set("b", b_val).unwrap();
                        let ke = OwnedKeyExpr::try_from(&formatter).unwrap();
                        let parsed = format.parse(&ke).unwrap();
                        assert_eq!(parsed.get("a").unwrap(), a_val);
                        assert_eq!(parsed.get("b").unwrap(), b_val);
                    }
                }
            }
        }
    }
    KeFormat::new("**/${a:**}/${b:**}/**").unwrap_err();
    let format = KeFormat::new("${a:**}/${b:**}").unwrap();
    assert_eq!(
        format
            .parse(keyexpr::new("a/b/c").unwrap())
            .unwrap()
            .get("a")
            .unwrap(),
        "a/b/c"
    );
    assert_eq!(
        format
            .parse(keyexpr::new("**").unwrap())
            .unwrap()
            .get("a")
            .unwrap(),
        "**"
    );
    assert_eq!(
        format
            .parse(keyexpr::new("**").unwrap())
            .unwrap()
            .get("b")
            .unwrap(),
        "**"
    );
    let format = KeFormat::new("hi/${a:there}/${b:**}").unwrap();
    assert_eq!(
        format
            .parse(keyexpr::new("hi/**").unwrap())
            .unwrap()
            .get("a")
            .unwrap(),
        "**"
    );
    assert_eq!(
        format
            .parse(keyexpr::new("hi/**").unwrap())
            .unwrap()
            .get("b")
            .unwrap(),
        "**"
    );
    let format = KeFormat::new("hi/${a:there}/@/${b:**}").unwrap();
    assert_eq!(
        format
            .parse(keyexpr::new("hi/**/@").unwrap())
            .unwrap()
            .get("a")
            .unwrap(),
        "**"
    );
    assert_eq!(
        format
            .parse(keyexpr::new("hi/**/@").unwrap())
            .unwrap()
            .get("b")
            .unwrap(),
        ""
    );
}