Skip to main content

Crate sui_package_resolver

Crate sui_package_resolver 

Source

Modules§

error

Structs§

CleverError
A CleverError is a special kind of abort code that is used to encode more information than a normal abort code. These clever errors are used to encode the line number, error constant name, and error constant value as pool indicies packed into a format satisfying the ErrorBitset format. This struct is the “inflated” view of that data, providing the module ID, line number, and error constant name and value (if available).
DataDef
Deserialized representation of a struct definition.
DatatypeRef
Fully qualified struct identifier. Uses copy-on-write strings so that when it is used as a key to a map, an instance can be created to query the map without having to allocate strings on the heap.
FunctionDef
Deserialized representation of a function definition
Limits
Optional configuration that imposes limits on the work that the resolver can do for each request.
Module
OpenSignature
Deserialized representation of a type signature that could appear as a function parameter or return.
Package
PackageStoreWithLruCache
Caches parsed packages by address in an LRU cache. Cache hits do not recheck the backing store. Callers must evict entries when system packages are upgraded, or use a fresh cache for each response against a fixed package view.
Resolver
The Resolver is responsible for providing information about types. It relies on its internal package_store to load packages and then type definitions from those packages.
Signature
A function parameter or return signature, with its type parameters instantiated.
SyncResolver
Synchronous sibling of Resolver, driven by a SyncPackageStore. Intended for hot-path callers (validator/authority execution) where the underlying storage is synchronous and async machinery would just add overhead.
VariantDef
Deserialized representation of an enum definition. These are always held inside an EnumDef.

Enums§

ErrorConstants
The ErrorConstants enum is used to represent the different kinds of error information that can be returned from a clever error when looking at the constant values for the clever error. These values are either:
MoveData
OpenSignatureBody
Deserialized representation of a type signature that could appear as a field type for a struct.
Reference

Constants§

DEFAULT_MAX_LAYOUT_WORK
Default limit on the cumulative number of layout nodes constructed or copied.

Traits§

PackageStore
Interface to abstract over access to a store of live packages. Used to override the default store during testing.
SyncPackageStore
Synchronous analogue of PackageStore, driving SyncResolver. Has no Send/Sync/'static bounds so implementations can borrow freely.

Functions§

as_type_tag

Type Aliases§

DatatypeKey
A StructRef that owns its strings.
Result