pub fn codepoint_to_codepoint(
        &mut self,
        name: &str,
        map: &BTreeMap<u32, u32>,
    ) -> Result<()> {
        self.header()?;
        self.separator()?;

        let name = rust_const_name(name);
        if self.opts.fst_dir.is_some() {
            let mut builder = MapBuilder::memory();
            for (&k, &v) in map {
                builder.insert(u32_key(k), v as u64)?;
            }
            let map = builder.into_map();
            self.fst(&name, map.as_fst(), true)?;
        } else {
            let table: Vec<(u32, u32)> =
                map.iter().map(|(&k, &v)| (k, v)).collect();
            self.ranges_slice(&name, &table)?;
        }
        self.wtr.flush()?;
        Ok(())
    }
/// Write a map that associates codepoints with other codepoints.
///
/// This supports the FST format in addition to the standard sorted slice
/// format. When using an FST, the keys and values are 32-bit big endian
/// unsigned integers.
Write a map that associates codepoints with other codepoints.
This supports the FST format in addition to the standard sorted slice
format. When using an FST, the keys and values are 32-bit big endian
unsigned integers.
Write a map that associates codepoints with other codepoints . This supports the FST format in addition to the standard sorted slice format . When using an FST the keys and values are 32 - bit big endian unsigned integers .
pub fn codepoint_to_codepoint(
        &mut self,
        name: &str,
        map: &BTreeMap<u32, u32>,
    ) -> Result<()> {
        self.header()?;
        self.separator()?;
        let name = rust_const_name(name);
        if self.opts.fst_dir.is_some() {
            let mut builder = MapBuilder::memory();
            for (&k, &v) in map {
                builder.insert(u32_key(k), v as u64)?;
            }
            let map = builder.into_map();
            self.fst(&name, map.as_fst(), true)?;
        } else {
            let table: Vec<(u32, u32)> =
                map.iter().map(|(&k, &v)| (k, v)).collect();
            self.ranges_slice(&name, &table)?;
        }
        self.wtr.flush()?;
        Ok(())
    }
pub fn codepoint_to_codepoint ( & mut self , name : & str , map : & BTreeMap < u32 , u32 > , ) -> Result < ( ) > { self . header ( ) ? ; self . separator ( ) ? ; let name = rust_const_name ( name ) ; if self . opts . fst_dir . is_some ( ) { let mut builder = MapBuilder :: memory ( ) ; for ( & k , & v ) in map { builder . insert ( u32_key ( k ) , v as u64 ) ? ; } let map = builder . into_map ( ) ; self . fst ( & name , map . as_fst ( ) , true ) ? ; } else { let table : Vec < ( u32 , u32 ) > = map . iter ( ) . map ( | ( & k , & v ) | ( k , v ) ) . collect ( ) ; self . ranges_slice ( & name , & table ) ? ; } self . wtr . flush ( ) ? ; Ok ( ( ) ) }
Write a map that associates codepoints with other codepoints.
Write a map that associates codepoints with other codepoints .
&mut self
name
&str
map
&BTreeMap<u32, u32>
&mut self
name
&str
map
&BTreeMap<u32, u32>