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_wasm: PathBuf,
pub dest_wasm: PathBuf,
pub ink_version: Version,
pub documentation: Option<Url>,
pub homepage: Option<Url>,
pub user: Option<Map<String, Value>>,
pub target_directory: PathBuf,
}Expand description
Relevant metadata obtained from Cargo.toml.
Fields§
§manifest_path: ManifestPath§cargo_meta: Metadata§contract_artifact_name: String§root_package: Package§original_wasm: PathBuf§dest_wasm: PathBuf§ink_version: Version§documentation: Option<Url>§homepage: Option<Url>§user: Option<Map<String, Value>>§target_directory: PathBufImplementations§
source§impl CrateMetadata
impl CrateMetadata
sourcepub fn from_manifest_path(manifest_path: Option<&PathBuf>) -> Result<Self>
pub fn from_manifest_path(manifest_path: Option<&PathBuf>) -> Result<Self>
Attempt to construct CrateMetadata from the given manifest path.
sourcepub fn collect(manifest_path: &ManifestPath) -> Result<Self>
pub fn collect(manifest_path: &ManifestPath) -> 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.