Struct contract_build::CrateMetadata
source · pub struct CrateMetadata {
pub manifest_path: ManifestPath,
pub cargo_meta: Metadata,
pub contract_artifact_name: String,
pub root_package: Package,
pub original_code: PathBuf,
pub dest_code: PathBuf,
pub ink_version: Version,
pub documentation: Option<Url>,
pub homepage: Option<Url>,
pub user: Option<Map<String, Value>>,
pub target_directory: PathBuf,
pub target_file_path: PathBuf,
}Expand description
Relevant metadata obtained from Cargo.toml.
Fields§
§manifest_path: ManifestPath§cargo_meta: Metadata§contract_artifact_name: String§root_package: Package§original_code: PathBuf§dest_code: PathBuf§ink_version: Version§documentation: Option<Url>§homepage: Option<Url>§user: Option<Map<String, Value>>§target_directory: PathBuf§target_file_path: PathBufImplementations§
source§impl CrateMetadata
impl CrateMetadata
sourcepub fn from_manifest_path(
manifest_path: Option<&PathBuf>,
target: Target
) -> Result<Self>
pub fn from_manifest_path( manifest_path: Option<&PathBuf>, target: Target ) -> Result<Self>
Attempt to construct CrateMetadata from the given manifest path.
sourcepub fn collect(manifest_path: &ManifestPath, target: Target) -> Result<Self>
pub fn collect(manifest_path: &ManifestPath, target: Target) -> Result<Self>
Parses the contract manifest and returns relevant metadata.
sourcepub fn metadata_path(&self) -> PathBuf
pub fn metadata_path(&self) -> PathBuf
Get the path of the contract metadata file
sourcepub fn contract_bundle_path(&self) -> PathBuf
pub fn contract_bundle_path(&self) -> PathBuf
Get the path of the contract bundle, containing metadata + code.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for CrateMetadata
impl Send for CrateMetadata
impl Sync for CrateMetadata
impl Unpin for CrateMetadata
impl UnwindSafe for CrateMetadata
Blanket Implementations§
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