pub fn resolve_parameter_ref(&self, doc_file: impl AsRef<Utf8Path>, reference: Reference) -> Result<Parameter> {
        let doc_file = doc_file.as_ref();
        let full_path = match reference.file {
            None => doc_file.to_owned(),
            Some(file) => io::join(doc_file, &file)?,
        };
        let name = reference.name.ok_or_else(|| Error::message(ErrorKind::Parse, "no name in ref"))?;
        let ref_key = RefKey {
            file_path: full_path,
            name,
        };
        Ok(self
            .parameters
            .get(&ref_key)
            .ok_or_else(|| Error::with_message(ErrorKind::Parse, || format!("parameter not found {ref_key:?}")))?
            .clone())
    }
/// Find the parameter for a given doc path and reference
Find the parameter for a given doc path and reference
Find the parameter for a given doc path and reference
pub fn resolve_parameter_ref(&self, doc_file: impl AsRef<Utf8Path>, reference: Reference) -> Result<Parameter> {
        let doc_file = doc_file.as_ref();
        let full_path = match reference.file {
            None => doc_file.to_owned(),
            Some(file) => io::join(doc_file, &file)?,
        };
        let name = reference.name.ok_or_else(|| Error::message(ErrorKind::Parse, "no name in ref"))?;
        let ref_key = RefKey {
            file_path: full_path,
            name,
        };
        Ok(self
            .parameters
            .get(&ref_key)
            .ok_or_else(|| Error::with_message(ErrorKind::Parse, || format!("parameter not found {ref_key:?}")))?
            .clone())
    }
pub fn resolve_parameter_ref ( & self , doc_file : impl AsRef < Utf8Path > , reference : Reference ) -> Result < Parameter > { let doc_file = doc_file . as_ref ( ) ; let full_path = match reference . file { None => doc_file . to_owned ( ) , Some ( file ) => io :: join ( doc_file , & file ) ? , } ; let name = reference . name . ok_or_else ( | | Error :: message ( ErrorKind :: Parse , " " ) ) ? ; let ref_key = RefKey { file_path : full_path , name , } ; Ok ( self . parameters . get ( & ref_key ) . ok_or_else ( | | Error :: with_message ( ErrorKind :: Parse , | | format ! ( " " ) ) ) ? . clone ( ) ) }
Find the parameter for a given doc path and reference
Find the parameter for a given doc path and reference
&self
doc_file
impl AsRef<Utf8Path>
reference
Reference