/// Function called for all declarations in a Candid file.
Function called for all declarations in a Candid file.
Function called for all declarations in a Candid file .
fn declarations(&self, declarations: &[Dec]) -> Result<String> {
        Ok(declarations
            .iter()
            .map(|d| match d {
                Dec::ImportD(module) => self.declaration_import(module),
                Dec::TypD(binding) => self.declaration_binding(binding),
            })
            .collect::<Result<Vec<String>>>()?
            .join("\n"))
    }
fn declarations ( & self , declarations : & [ Dec ] ) -> Result < String > { Ok ( declarations . iter ( ) . map ( | d | match d { Dec :: ImportD ( module ) => self . declaration_import ( module ) , Dec :: TypD ( binding ) => self . declaration_binding ( binding ) , } ) . collect :: < Result < Vec < String > > > ( ) ? . join ( " \n " ) ) }
Function called for all declarations in a Candid file.
Function called for all declarations in a Candid file .
&self
declarations
&[Dec]