Expand description
Top-level dispatcher for the unified GetDocumentsCount request.
Owns the whole pipeline: CBOR-decode → mode detection →
per-mode executor (see super::executors) → response
wrapping. The drive-abci handler builds a
DocumentCountRequest and calls
Drive::execute_document_count_request; everything past
contract lookup lives in drive.
Both DocumentCountRequest and DocumentCountResponse are
the ABI for this dispatcher — they’re public so drive-abci can
name the input/output types without reaching into the
executor surface.
Module is gated feature = "server" via the parent’s
pub mod drive_dispatcher; declaration.
Structs§
- Document
Count Request - All inputs required for the unified document-count entry point
Drive::execute_document_count_request. Built by the gRPC handler from aGetDocumentsRequestV1after wire-decoding + contract lookup; drive owns everything past this point including mode-detection-from-clauses, index picking, and per-mode dispatch.
Enums§
- Document
Count Response - Output shape of
Drive::execute_document_count_request. Three variants mirror the proto’sCountResults.variantoneof (for no-proof responses) plus the outerProofarm:
Functions§
- order_
clauses_ from_ value - Parse the decoded
order_byvalue into structuredOrderClauses. - validate_
and_ canonicalize_ where_ clauses - Run the system-wide where-clause validator on a structured
Vec<WhereClause>and canonicalize same-field range pairs into theirbetween*form. Single source of truth for the count-endpoint shape contract; called both from the legacy CBOR-decoded entrywhere_clauses_from_valueand from the dispatcher’s typed entry,Drive::execute_document_count_request. - where_
clauses_ from_ value - Parse the decoded
wherevalue into structuredWhereClauses.