fn recv_get(&mut self, query: Header, res: Result<(), Cid>) {
        if let Some(id) = query.parent {
            self.sync_query(id, |mgr, parent, mut state| {
                state.missing.remove(&query.id);
                if res.is_err() {
                    Transition::Complete(res)
                } else {
                    state
                        .children
                        .insert(mgr.missing_blocks(parent.root, query.cid));
                    Transition::Next(state)
                }
            });
        } else {
            self.events.push_back(QueryEvent::Complete(query.id, res));
        }
    }
/// Processes the response of a get query.
///
/// If it is part of a sync query a new missing blocks query is started. Otherwise
/// the get query emits a `complete` event.
Processes the response of a get query.
If it is part of a sync query a new missing blocks query is started. Otherwise
the get query emits a `complete` event.
Processes the response of a get query . If it is part of a sync query a new missing blocks query is started . Otherwise the get query emits a ` complete ` event .
fn recv_get(&mut self, query: Header, res: Result<(), Cid>) {
        if let Some(id) = query.parent {
            self.sync_query(id, |mgr, parent, mut state| {
                state.missing.remove(&query.id);
                if res.is_err() {
                    Transition::Complete(res)
                } else {
                    state
                        .children
                        .insert(mgr.missing_blocks(parent.root, query.cid));
                    Transition::Next(state)
                }
            });
        } else {
            self.events.push_back(QueryEvent::Complete(query.id, res));
        }
    }
fn recv_get ( & mut self , query : Header , res : Result < ( ) , Cid > ) { if let Some ( id ) = query . parent { self . sync_query ( id , | mgr , parent , mut state | { state . missing . remove ( & query . id ) ; if res . is_err ( ) { Transition :: Complete ( res ) } else { state . children . insert ( mgr . missing_blocks ( parent . root , query . cid ) ) ; Transition :: Next ( state ) } } ) ; } else { self . events . push_back ( QueryEvent :: Complete ( query . id , res ) ) ; } }
Processes the response of a get query.
Processes the response of a get query .
&mut self
query
Header
res
Result<(), Cid>
&mut self
query
Header
res
Result<(), Cid>