Skip to main content

Module move_package_service

Module move_package_service 

Source

Modules§

conversions

Structs§

AllPackageVersionsQuery
The versions a ListPackageVersions request with package_id unset lists, across every package in [PackagePublishKey] order, and how its response pages: the request’s checkpoint range and cursors intersected into one range of keys. Public so other implementors of MovePackageService parse requests and page responses the same way.
PackageVersionsQuery
The versions a ListPackageVersions request lists and how its response pages: the request’s version bounds, checkpoint range, page token, and cursors intersected into one version range, validated against the lineage being listed. Public so other implementors of MovePackageService parse requests and page responses the same way.

Enums§

PackageVersionCursor
The position of one listed version, set as PackageVersion.cursor and accepted back as options.after and options.before. Public so other implementors of MovePackageService mint and accept the same cursors. BCS-encoded as an enum with one variant per listing, so a listing can be added without changing the encoding of existing cursors.

Functions§

check_checkpoint_range
Check the checkpoint range of a ListPackageVersions request against highest_indexed, the highest checkpoint the server has indexed, before the listing reads anything. Validate the request with validate_request first, and, for a package the server knows, check that its page token or cursors name the package’s lineage with PackageVersionsQuery::new, so a malformed request is refused as such whatever its range. Public so other implementors of MovePackageService refuse the same requests.
get_datatype_response
Build a GetDatatype response from an already-loaded package. Shared with other implementors of MovePackageService (e.g. sui-kv-rpc) that load packages from a different backend.
get_function_response
Build a GetFunction response from an already-loaded package. Shared with other implementors of MovePackageService (e.g. sui-kv-rpc) that load packages from a different backend.
get_package_response
Build a GetPackage response from an already-loaded package. Shared with other implementors of MovePackageService (e.g. sui-kv-rpc) that load packages from a different backend.
pages_by_token
Whether request pages by page token, as on servers that predate cursor paging: it names a package with package_id and sets none of the fields that select cursor paging, options, start_version, end_version, start_checkpoint and end_checkpoint, so it has the request shape those servers accept. The listing of every package, with package_id unset, always pages by cursor. Public so other implementors of MovePackageService tell the two paging modes apart the same way.
unknown_package_response
The answer to a request in cursor mode for a package the server does not know as of highest_indexed, the highest checkpoint it has indexed (kv-rpc: its served height): no version of it was published at or below that checkpoint. Public so other implementors of MovePackageService answer such requests the same way. Check the request’s checkpoint range with check_checkpoint_range first.
validate_request
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.