pub fn select_claim_prefix(
candidates: &[ClaimCandidate],
boundary: QueuedWorkClaimBoundary,
max_batches: usize,
) -> usizeExpand description
Select the prefix of candidates that a single claim may take.
Returns the number of leading candidates to claim (0 means no claim):
- An
QueuedWorkClaimBoundary::ActiveTurnCheckpointboundary only admits work whose head batch isDeliveryPolicy::EarliestSafeBoundary. - An
SlotPolicy::Exclusivehead claims exactly one batch. - A
SlotPolicy::Joinhead extends through immediately followingJoinbatches with the same delivery policy and merge key, up tomax_batches.