pub fn cut_idx_key(key: Vec<u8>, col_ids: &[i64]) -> Result<(RowColsDict, Option<i64>)> {
    let mut meta_map: HashMap<i64, RowColMeta> =
        HashMap::with_capacity_and_hasher(col_ids.len(), Default::default());
    let handle = {
        let mut tmp_data: &[u8] = &key[PREFIX_LEN + ID_LEN..];
        let length = key.len();
        // parse cols from data
        for &id in col_ids {
            let offset = length - tmp_data.len();
            let (val, rem) = datum::split_datum(tmp_data, false)?;
            meta_map.insert(id, RowColMeta::new(offset, val.len()));
            tmp_data = rem;
        }

        if tmp_data.is_empty() {
            None
        } else {
            Some(tmp_data.read_datum()?.i64())
        }
    };
    Ok((RowColsDict::new(meta_map, key), handle))
}
/// `cut_idx_key` cuts the encoded index key into RowColsDict and handle .
`cut_idx_key` cuts the encoded index key into RowColsDict and handle .
` cut_idx_key ` cuts the encoded index key into RowColsDict and handle .
pub fn cut_idx_key(key: Vec<u8>, col_ids: &[i64]) -> Result<(RowColsDict, Option<i64>)> {
    let mut meta_map: HashMap<i64, RowColMeta> =
        HashMap::with_capacity_and_hasher(col_ids.len(), Default::default());
    let handle = {
        let mut tmp_data: &[u8] = &key[PREFIX_LEN + ID_LEN..];
        let length = key.len();
        // parse cols from data
        for &id in col_ids {
            let offset = length - tmp_data.len();
            let (val, rem) = datum::split_datum(tmp_data, false)?;
            meta_map.insert(id, RowColMeta::new(offset, val.len()));
            tmp_data = rem;
        }
        if tmp_data.is_empty() {
            None
        } else {
            Some(tmp_data.read_datum()?.i64())
        }
    };
    Ok((RowColsDict::new(meta_map, key), handle))
}
pub fn cut_idx_key ( key : Vec < u8 > , col_ids : & [ i64 ] ) -> Result < ( RowColsDict , Option < i64 > ) > { let mut meta_map : HashMap < i64 , RowColMeta > = HashMap :: with_capacity_and_hasher ( col_ids . len ( ) , Default :: default ( ) ) ; let handle = { let mut tmp_data : & [ u8 ] = & key [ PREFIX_LEN + ID_LEN .. ] ; let length = key . len ( ) ; // parse cols from data for & id in col_ids { let offset = length - tmp_data . len ( ) ; let ( val , rem ) = datum :: split_datum ( tmp_data , false ) ? ; meta_map . insert ( id , RowColMeta :: new ( offset , val . len ( ) ) ) ; tmp_data = rem ; } if tmp_data . is_empty ( ) { None } else { Some ( tmp_data . read_datum ( ) ? . i64 ( ) ) } } ; Ok ( ( RowColsDict :: new ( meta_map , key ) , handle ) ) }
`cut_idx_key` cuts the encoded index key into RowColsDict and handle .
` cut_idx_key ` cuts the encoded index key into RowColsDict and handle .
key
Vec<u8>
col_ids
&[i64]