Skip to main content

is_done

Function is_done 

Source
pub fn is_done(req: &Msg) -> bool
Expand description

True when the request has been resolved end-to-end: a response has been selected, all fragments are accounted for, and (for fragment vectors) the parent fragment has finished aggregating.

The connection-coupled propagation pass that walks the client queue and marks every sibling fragment lands in Stage 9; this helper returns the data-shape answer for a single request.

ยงExamples

use dynomite::msg::{request, Msg, MsgType};

let mut req = Msg::new(1, MsgType::ReqRedisGet, true);
assert!(!request::is_done(&req));
req.set_selected_rsp(Some(2));
assert!(request::is_done(&req));