Struct forc_pkg::BuiltPackage
source · pub struct BuiltPackage {
pub build_target: BuildTarget,
pub json_abi_program: ProgramABI,
pub storage_slots: Vec<StorageSlot>,
pub bytecode: Vec<u8>,
pub entries: Vec<PkgEntry>,
pub tree_type: TreeType,
pub pkg_name: String,
pub built_pkg_descriptor: BuiltPackageDescriptor,
/* private fields */
}
Expand description
The result of successfully compiling a package.
Fields§
§build_target: BuildTarget
§json_abi_program: ProgramABI
§storage_slots: Vec<StorageSlot>
§bytecode: Vec<u8>
§entries: Vec<PkgEntry>
§tree_type: TreeType
§pkg_name: String
§built_pkg_descriptor: BuiltPackageDescriptor
Implementations§
source§impl BuiltPackage
impl BuiltPackage
sourcepub fn write_bytecode(&self, path: &Path) -> Result<()>
pub fn write_bytecode(&self, path: &Path) -> Result<()>
Writes bytecode of the BuiltPackage to the given path
.
sourcepub fn write_debug_info(&self, path: &Path) -> Result<()>
pub fn write_debug_info(&self, path: &Path) -> Result<()>
Writes debug_info (source_map) of the BuiltPackage to the given path
.
sourcepub fn write_output(
&self,
minify: MinifyOpts,
pkg_name: &str,
output_dir: &Path
) -> Result<()>
pub fn write_output( &self, minify: MinifyOpts, pkg_name: &str, output_dir: &Path ) -> Result<()>
Writes BuiltPackage to output_dir
.
Trait Implementations§
source§impl Clone for BuiltPackage
impl Clone for BuiltPackage
source§fn clone(&self) -> BuiltPackage
fn clone(&self) -> BuiltPackage
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 moreAuto Trait Implementations§
impl RefUnwindSafe for BuiltPackage
impl Send for BuiltPackage
impl Sync for BuiltPackage
impl Unpin for BuiltPackage
impl UnwindSafe for BuiltPackage
Blanket Implementations§
§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.