pub fn walk_dup<'tx: 'cur, 'cur, C, T>(
    cursor: &'cur mut C,
    start_key: T::Key,
) -> impl Stream<Item = anyhow::Result<T::Value>> + 'cur
where
    C: CursorDupSort<'tx, T>,
    T: DupSort,
    T::Key: TableDecode,
    'tx: 'cur,
{
    try_stream! {
        let start = cursor.seek_exact(start_key).await?.map(|(_, v)| v);
        if let Some(mut value) = start {
            loop {
                yield value;

                match cursor.next_dup().await? {
                    Some((_, v)) => {
                        value = v;
                    }
                    None => break,
                }
            }
        }
    }
}
/// Walk over duplicates for some specific key.
Walk over duplicates for some specific key.
Walk over duplicates for some specific key .
pub fn walk_dup<'tx: 'cur, 'cur, C, T>(
    cursor: &'cur mut C,
    start_key: T::Key,
) -> impl Stream<Item = anyhow::Result<T::Value>> + 'cur
where
    C: CursorDupSort<'tx, T>,
    T: DupSort,
    T::Key: TableDecode,
    'tx: 'cur,
{
    try_stream! {
        let start = cursor.seek_exact(start_key).await?.map(|(_, v)| v);
        if let Some(mut value) = start {
            loop {
                yield value;
                match cursor.next_dup().await? {
                    Some((_, v)) => {
                        value = v;
                    }
                    None => break,
                }
            }
        }
    }
}
pub fn walk_dup < ' tx : ' cur , ' cur , C , T > ( cursor : & ' cur mut C , start_key : T :: Key , ) -> impl Stream < Item = anyhow :: Result < T :: Value > > + ' cur where C : CursorDupSort < ' tx , T > , T : DupSort , T :: Key : TableDecode , ' tx : ' cur , { try_stream ! { let start cursor seek_exact ( start_key ) await map ( ( v ) v ) if let Some ( mut value ) start { loop { yield value match cursor next_dup ( ) await { Some ( ( v ) ) { value v } None break } } } } }
Walk over duplicates for some specific key.
Walk over duplicates for some specific key .
cursor
&'cur mut C
start_key
T::Key
cursor
&'cur mut C
start_key
T::Key