Skip to main content

validate_request

Function validate_request 

Source
pub fn validate_request(request: &ListPackageVersionsRequest) -> Result<()>
Expand description

Validate a ListPackageVersions request before any range, tip or floor rule applies to it, as the other List methods validate theirs, so a malformed request is INVALID_ARGUMENT whatever its range: an end_checkpoint below start_checkpoint, an invalid options.ordering, or a page token or cursor that does not decode, or that the other listing minted (a lineage cursor with package_id unset, or one of the listing of every package with it set). A lineage listing also refuses an end_version below start_version, and page_size or page_token combined with a field that selects cursor paging (see pages_by_token); the listing of every package refuses page_size, page_token, start_version and end_version. Reads nothing, so it runs before the package is loaded; whether a page token or cursor names the requested lineage is checked once the package is loaded, by PackageVersionsQuery::new. Public so other implementors of MovePackageService refuse the same requests.