pub struct CompiledPackage {
pub package: CompiledPackage,
pub published_at: Option<ObjectID>,
pub dependency_ids: PackageDependencies,
}Expand description
Wrapper around the core Move CompiledPackage with some Sui-specific traits and info
Fields§
§package: CompiledPackage§published_at: Option<ObjectID>Address the package is recorded as being published at.
dependency_ids: PackageDependenciesThe dependency IDs of this package
Implementations§
Source§impl CompiledPackage
impl CompiledPackage
Sourcepub fn get_modules(&self) -> impl Iterator<Item = &CompiledModule>
pub fn get_modules(&self) -> impl Iterator<Item = &CompiledModule>
Return all of the bytecode modules in this package (not including direct or transitive deps)
Note: these are not topologically sorted by dependency–use get_dependency_sorted_modules to produce a list of modules suitable
for publishing or static analysis
Sourcepub fn into_modules(self) -> Vec<CompiledModule>
pub fn into_modules(self) -> Vec<CompiledModule>
Return all of the bytecode modules in this package (not including direct or transitive deps)
Note: these are not topologically sorted by dependency–use get_dependency_sorted_modules to produce a list of modules suitable
for publishing or static analysis
Sourcepub fn get_dependent_modules(&self) -> impl Iterator<Item = &CompiledModule>
pub fn get_dependent_modules(&self) -> impl Iterator<Item = &CompiledModule>
Return all of the bytecode modules that this package depends on (both directly and transitively) Note: these are not topologically sorted by dependency.
Sourcepub fn get_modules_and_deps(&self) -> impl Iterator<Item = &CompiledModule>
pub fn get_modules_and_deps(&self) -> impl Iterator<Item = &CompiledModule>
Return all of the bytecode modules in this package and the modules of its direct and transitive dependencies. Note: these are not topologically sorted by dependency.
Sourcepub fn get_dependency_sorted_modules(
&self,
with_unpublished_deps: bool,
) -> Vec<CompiledModule>
pub fn get_dependency_sorted_modules( &self, with_unpublished_deps: bool, ) -> Vec<CompiledModule>
Return the bytecode modules in this package, topologically sorted in dependency order.
Optionally include dependencies that have not been published (are at address 0x0), if
with_unpublished_deps is true. This is the function to call if you would like to publish
or statically analyze the modules.
Sourcepub fn get_dependency_storage_package_ids(&self) -> Vec<ObjectID>
pub fn get_dependency_storage_package_ids(&self) -> Vec<ObjectID>
Return the set of Object IDs corresponding to this package’s transitive dependencies’ storage package IDs (where to load those packages on-chain).
Sourcepub fn get_package_digest(&self, with_unpublished_deps: bool) -> [u8; 32]
pub fn get_package_digest(&self, with_unpublished_deps: bool) -> [u8; 32]
Return a digest of the bytecode modules in this package.
Sourcepub fn get_package_bytes(&self, with_unpublished_deps: bool) -> Vec<Vec<u8>>
pub fn get_package_bytes(&self, with_unpublished_deps: bool) -> Vec<Vec<u8>>
Return a serialized representation of the bytecode modules in this package, topologically sorted in dependency order
Sourcepub fn get_package_base64(&self, with_unpublished_deps: bool) -> Vec<Base64>
pub fn get_package_base64(&self, with_unpublished_deps: bool) -> Vec<Base64>
Return the base64-encoded representation of the bytecode modules in this package, topologically sorted in dependency order
Sourcepub fn get_deepbook_modules(&self) -> impl Iterator<Item = &CompiledModule>
pub fn get_deepbook_modules(&self) -> impl Iterator<Item = &CompiledModule>
Get bytecode modules from DeepBook that are used by this package
Sourcepub fn get_bridge_modules(&self) -> impl Iterator<Item = &CompiledModule>
pub fn get_bridge_modules(&self) -> impl Iterator<Item = &CompiledModule>
Get bytecode modules from DeepBook that are used by this package
Sourcepub fn get_sui_system_modules(&self) -> impl Iterator<Item = &CompiledModule>
pub fn get_sui_system_modules(&self) -> impl Iterator<Item = &CompiledModule>
Get bytecode modules from the Sui System that are used by this package
Sourcepub fn get_sui_framework_modules(&self) -> impl Iterator<Item = &CompiledModule>
pub fn get_sui_framework_modules(&self) -> impl Iterator<Item = &CompiledModule>
Get bytecode modules from the Sui Framework that are used by this package
Sourcepub fn get_stdlib_modules(&self) -> impl Iterator<Item = &CompiledModule>
pub fn get_stdlib_modules(&self) -> impl Iterator<Item = &CompiledModule>
Get bytecode modules from the Move stdlib that are used by this package
Sourcepub fn generate_struct_layouts(&self) -> Registry
pub fn generate_struct_layouts(&self) -> Registry
Generate layout schemas for all types declared by this package, as well as
all struct types passed into entry functions declared by modules in this package
(either directly or by reference).
These layout schemas can be consumed by clients (e.g., the TypeScript SDK) to enable
BCS serialization/deserialization of the package’s objects, tx arguments, and events.
Sourcepub fn is_system_package(&self) -> bool
pub fn is_system_package(&self) -> bool
Checks whether this package corresponds to a built-in framework
Sourcepub fn published_root_module(&self) -> Option<&CompiledModule>
pub fn published_root_module(&self) -> Option<&CompiledModule>
Checks for root modules with non-zero package addresses. Returns an arbitrary one, if one
can be found, otherwise returns None.
pub fn verify_unpublished_dependencies( &self, unpublished_deps: &BTreeSet<Symbol>, ) -> SuiResult<()>
pub fn get_published_dependencies_ids(&self) -> Vec<ObjectID>
Trait Implementations§
Source§impl Clone for CompiledPackage
impl Clone for CompiledPackage
Source§fn clone(&self) -> CompiledPackage
fn clone(&self) -> CompiledPackage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompiledPackage
impl Debug for CompiledPackage
Auto Trait Implementations§
impl Freeze for CompiledPackage
impl RefUnwindSafe for CompiledPackage
impl Send for CompiledPackage
impl Sync for CompiledPackage
impl Unpin for CompiledPackage
impl UnwindSafe for CompiledPackage
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§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§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.