pub fn string_to_string_to_string(
        &mut self,
        name: &str,
        map: &BTreeMap<String, BTreeMap<String, String>>,
    ) -> Result<()> {
        if self.opts.fst_dir.is_some() {
            return err!("cannot emit string->string map as an FST");
        }

        self.header()?;
        self.separator()?;

        let name = rust_const_name(name);
        writeln!(
            self.wtr,
            "pub const {}: &'static \
             [(&'static str, \
             &'static [(&'static str, &'static str)])] = &[",
            name
        )?;
        let mut first = true;
        for (k1, kv) in map {
            if !first {
                writeln!(self.wtr, "")?;
            }
            first = false;

            self.wtr.write_str(&format!("({:?}, &[", k1))?;
            for (k2, v) in kv {
                self.wtr.write_str(&format!("({:?}, {:?}), ", k2, v))?;
            }
            self.wtr.write_str("]), ")?;
        }
        writeln!(self.wtr, "];")?;

        self.wtr.flush()?;
        Ok(())
    }
/// Write a map that associates strings to another map from strings to
/// strings.
///
/// The only supported output format is a sorted slice, which can be
/// binary searched.
Write a map that associates strings to another map from strings to
strings.

The only supported output format is a sorted slice, which can be
binary searched.
Write a map that associates strings to another map from strings to strings . The only supported output format is a sorted slice which can be binary searched .
pub fn string_to_string_to_string(
        &mut self,
        name: &str,
        map: &BTreeMap<String, BTreeMap<String, String>>,
    ) -> Result<()> {
        if self.opts.fst_dir.is_some() {
            return err!("cannot emit string->string map as an FST");
        }
        self.header()?;
        self.separator()?;
        let name = rust_const_name(name);
        writeln!(
            self.wtr,
            "pub const {}: &'static \
             [(&'static str, \
             &'static [(&'static str, &'static str)])] = &[",
            name
        )?;
        let mut first = true;
        for (k1, kv) in map {
            if !first {
                writeln!(self.wtr, "")?;
            }
            first = false;
            self.wtr.write_str(&format!("({:?}, &[", k1))?;
            for (k2, v) in kv {
                self.wtr.write_str(&format!("({:?}, {:?}), ", k2, v))?;
            }
            self.wtr.write_str("]), ")?;
        }
        writeln!(self.wtr, "];")?;
        self.wtr.flush()?;
        Ok(())
    }
pub fn string_to_string_to_string ( & mut self , name : & str , map : & BTreeMap < String , BTreeMap < String , String > > , ) -> Result < ( ) > { if self . opts . fst_dir . is_some ( ) { return err ! ( " " ) ; } self . header ( ) ? ; self . separator ( ) ? ; let name = rust_const_name ( name ) ; writeln ! ( self wtr " \
 \
 " name ) ? ; let mut first = true ; for ( k1 , kv ) in map { if ! first { writeln ! ( self wtr " " ) ? ; } first = false ; self . wtr . write_str ( & format ! ( " " k1 ) ) ? ; for ( k2 , v ) in kv { self . wtr . write_str ( & format ! ( " " k2 v ) ) ? ; } self . wtr . write_str ( " " ) ? ; } writeln ! ( self wtr " " ) ? ; self . wtr . flush ( ) ? ; Ok ( ( ) ) }
Write a map that associates strings to another map from strings to
strings.
Write a map that associates strings to another map from strings to strings .
&mut self
name
&str
map
&BTreeMap<String, BTreeMap<String, String>>
&mut self
name
&str
map
&BTreeMap<String, BTreeMap<String, String>>