fn iterate_internal<T, F>(
    mut cursor: LabelReader,
    mut key: BuilderData, 
    mut bit_len: usize, 
    found: &mut F
) -> Result<bool>
where
    F: FnMut(BuilderData, SliceData) -> Result<bool>,
    T: HashmapType + ?Sized
{
    if !cursor.already_read() {
        key = cursor.get_label_raw(&mut bit_len, key)?;
    }
    if bit_len == 0 {
        found(key, cursor.remainder()?)
    } else {
        bit_len -= 1;
        for i in 0..2 {
            let mut key = key.clone();
            key.append_bit_bool(i != 0)?;
            if !iterate_internal::<T, F>(cursor.next_reader::<T>(i, &mut 0)?, key, bit_len, found)? {
                return Ok(false)
            }
        }
        Ok(true)
    }
}
/// iterate all elements with callback function
iterate all elements with callback function
iterate all elements with callback function
fn iterate_internal<T, F>(
    mut cursor: LabelReader,
    mut key: BuilderData, 
    mut bit_len: usize, 
    found: &mut F
) -> Result<bool>
where
    F: FnMut(BuilderData, SliceData) -> Result<bool>,
    T: HashmapType + ?Sized
{
    if !cursor.already_read() {
        key = cursor.get_label_raw(&mut bit_len, key)?;
    }
    if bit_len == 0 {
        found(key, cursor.remainder()?)
    } else {
        bit_len -= 1;
        for i in 0..2 {
            let mut key = key.clone();
            key.append_bit_bool(i != 0)?;
            if !iterate_internal::<T, F>(cursor.next_reader::<T>(i, &mut 0)?, key, bit_len, found)? {
                return Ok(false)
            }
        }
        Ok(true)
    }
}
fn iterate_internal < T , F > ( mut cursor : LabelReader , mut key : BuilderData , mut bit_len : usize , found : & mut F ) -> Result < bool > where F : FnMut ( BuilderData , SliceData ) -> Result < bool > , T : HashmapType + ? Sized { if ! cursor . already_read ( ) { key = cursor . get_label_raw ( & mut bit_len , key ) ? ; } if bit_len == 0 { found ( key , cursor . remainder ( ) ? ) } else { bit_len -= 1 ; for i in 0 .. 2 { let mut key = key . clone ( ) ; key . append_bit_bool ( i != 0 ) ? ; if ! iterate_internal :: < T , F > ( cursor . next_reader :: < T > ( i , & mut 0 ) ? , key , bit_len , found ) ? { return Ok ( false ) } } Ok ( true ) } }
iterate all elements with callback function
iterate all elements with callback function
cursor
LabelReader
key
BuilderData
bit_len
usize
found
&mut F
cursor
LabelReader
key
BuilderData
bit_len
usize
found
&mut F