Struct forc_pkg::BuiltPackage
source · pub struct BuiltPackage {
pub descriptor: PackageDescriptor,
pub program_abi: ProgramABI,
pub storage_slots: Vec<StorageSlot>,
pub warnings: Vec<CompileWarning>,
pub tree_type: TreeType,
pub bytecode: BuiltPackageBytecode,
pub bytecode_without_tests: Option<BuiltPackageBytecode>,
/* private fields */
}Expand description
The result of successfully compiling a package.
Fields§
§descriptor: PackageDescriptor§program_abi: ProgramABI§storage_slots: Vec<StorageSlot>§warnings: Vec<CompileWarning>§tree_type: TreeType§bytecode: BuiltPackageBytecode§bytecode_without_tests: Option<BuiltPackageBytecode>Some for contract member builds where tests were included. This is
required so that we can deploy once instance of the contract (without
tests) with a valid contract ID before executing the tests as scripts.
For non-contract members, this is always None.
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.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
Mutably borrows from an owned value. Read more
§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.