Struct sui_sdk_types::types::MovePackage
source · 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>,
}
Fields§
§id: ObjectId
§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>>
§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>
Trait Implementations§
source§impl Clone for MovePackage
impl Clone for MovePackage
source§fn clone(&self) -> MovePackage
fn clone(&self) -> MovePackage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
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>,
Casts
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 moresource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)