pub struct MovePackage {
pub id: ObjectId,
pub version: Version,
pub modules: BTreeMap<Identifier, Vec<u8>>,
pub type_origin_table: Vec<TypeOrigin>,
pub linkage_table: BTreeMap<ObjectId, UpgradeInfo>,
}
Expand description
A move package
§BCS
The BCS serialized form for this type is defined by the following ABNF:
object-move-package = object-id u64 move-modules type-origin-table linkage-table
move-modules = map (identifier bytes)
type-origin-table = vector type-origin
linkage-table = map (object-id upgrade-info)
Fields§
§id: ObjectId
Address or Id of this package
version: Version
Most move packages are uniquely identified by their ID (i.e. there is only one version per ID), but the version is still stored because one package may be an upgrade of another (at a different ID), in which case its version will be one greater than the version of the upgraded package.
Framework packages are an exception to this rule – all versions of the framework packages exist at the same ID, at increasing versions.
In all cases, packages are referred to by move calls using just their ID, and they are always loaded at their latest version.
modules: BTreeMap<Identifier, Vec<u8>>
Set of modules defined by this package
type_origin_table: Vec<TypeOrigin>
Maps struct/module to a package version where it was first defined, stored as a vector for simple serialization and deserialization.
linkage_table: BTreeMap<ObjectId, UpgradeInfo>
For each dependency, maps original package ID to the info about the (upgraded) dependency version that this package is using
Trait Implementations§
Source§impl Arbitrary for MovePackage
impl Arbitrary for MovePackage
Source§type Parameters = ()
type Parameters = ()
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = BoxedStrategy<MovePackage>
type Strategy = BoxedStrategy<MovePackage>
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl Clone for MovePackage
impl Clone for MovePackage
Source§fn clone(&self) -> MovePackage
fn clone(&self) -> MovePackage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MovePackage
impl Debug for MovePackage
Source§impl<'de> Deserialize<'de> for MovePackage
impl<'de> Deserialize<'de> for MovePackage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for MovePackage
impl Hash for MovePackage
Source§impl PartialEq for MovePackage
impl PartialEq for MovePackage
Source§impl Serialize for MovePackage
impl Serialize for MovePackage
impl Eq for MovePackage
impl StructuralPartialEq for MovePackage
Auto Trait Implementations§
impl Freeze for MovePackage
impl RefUnwindSafe for MovePackage
impl Send for MovePackage
impl Sync for MovePackage
impl Unpin for MovePackage
impl UnwindSafe for MovePackage
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read more