Struct move_package::compilation::compiled_package::CompiledPackage   
source · [−]pub struct CompiledPackage {
    pub compiled_package_info: CompiledPackageInfo,
    pub root_compiled_units: Vec<CompiledUnitWithSource>,
    pub deps_compiled_units: Vec<(PackageName, CompiledUnitWithSource)>,
    pub compiled_docs: Option<Vec<(String, String)>>,
    pub compiled_abis: Option<Vec<(String, Vec<u8>)>>,
}Expand description
Represents a compiled package in memory.
Fields
compiled_package_info: CompiledPackageInfoMeta information about the compilation of this CompiledPackage
root_compiled_units: Vec<CompiledUnitWithSource>The output compiled bytecode in the root package (both module, and scripts) along with its source file
deps_compiled_units: Vec<(PackageName, CompiledUnitWithSource)>The output compiled bytecode for dependencies
compiled_docs: Option<Vec<(String, String)>>filename -> doctext
compiled_abis: Option<Vec<(String, Vec<u8>)>>filename -> json bytes for ScriptABI. Can then be used to generate transaction builders in various languages.
Implementations
sourceimpl CompiledPackage
 
impl CompiledPackage
sourcepub fn all_compiled_units_with_source(
    &self
) -> impl Iterator<Item = &CompiledUnitWithSource>
 
pub fn all_compiled_units_with_source(
    &self
) -> impl Iterator<Item = &CompiledUnitWithSource>
Returns all compiled units with sources for this package in transitive dependencies. Order is not guaranteed.
sourcepub fn all_compiled_units(&self) -> impl Iterator<Item = &CompiledUnit>
 
pub fn all_compiled_units(&self) -> impl Iterator<Item = &CompiledUnit>
Returns all compiled units for this package in transitive dependencies. Order is not guaranteed.
sourcepub fn all_modules_map(&self) -> Modules<'_>
 
pub fn all_modules_map(&self) -> Modules<'_>
Returns compiled modules for this package and its transitive dependencies
pub fn root_modules_map(&self) -> Modules<'_>
sourcepub fn all_modules(&self) -> impl Iterator<Item = &CompiledUnitWithSource>
 
pub fn all_modules(&self) -> impl Iterator<Item = &CompiledUnitWithSource>
all_compiled_units_with_source filtered over CompiledUnit::Module
sourcepub fn root_modules(&self) -> impl Iterator<Item = &CompiledUnitWithSource>
 
pub fn root_modules(&self) -> impl Iterator<Item = &CompiledUnitWithSource>
root_compiled_units filtered over CompiledUnit::Module
pub fn get_module_by_name(
    &self, 
    package_name: &str, 
    module_name: &str
) -> Result<&CompiledUnitWithSource>
pub fn get_module_by_name_from_root(
    &self, 
    module_name: &str
) -> Result<&CompiledUnitWithSource>
pub fn scripts(&self) -> impl Iterator<Item = &CompiledUnitWithSource>
Trait Implementations
sourceimpl Clone for CompiledPackage
 
impl Clone for CompiledPackage
sourcefn clone(&self) -> CompiledPackage
 
fn clone(&self) -> CompiledPackage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for CompiledPackage
impl Send for CompiledPackage
impl Sync for CompiledPackage
impl Unpin for CompiledPackage
impl UnwindSafe for CompiledPackage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
    T: Clone, 
 
impl<T> ToOwned for T where
    T: Clone, 
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
 
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more