#[non_exhaustive]pub struct PackageMetadata {
pub id: PackageId,
pub name: String,
pub version: Version,
pub edition: Option<String>,
pub source: SourceId,
pub manifest_path: Utf8PathBuf,
pub root: Utf8PathBuf,
pub dependencies: Vec<DependencyMetadata>,
pub targets: Vec<TargetMetadata>,
pub manifest_metadata: ManifestMetadata,
pub experimental_features: Vec<String>,
pub extra: HashMap<String, Value>,
}Expand description
Metadata of single Scarb package.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: PackageIdPackage ID.
name: StringPackage name as given in Scarb.toml.
version: VersionPackage version as given in Scarb.toml.
edition: Option<String>Package edition as given in Scarb.toml.
source: SourceIdThe source of the package.
manifest_path: Utf8PathBufPath to the manifest file defining this package.
root: Utf8PathBufPath to the directory containing this package.
dependencies: Vec<DependencyMetadata>List of dependencies of this particular package.
targets: Vec<TargetMetadata>Targets provided by the package. (lib, starknet-contract, etc.).
manifest_metadata: ManifestMetadataVarious metadata fields from Scarb.toml.
experimental_features: Vec<String>Compiler experimental features allowed for this package.
extra: HashMap<String, Value>Additional data not captured by deserializer.
Implementations§
Source§impl PackageMetadata
impl PackageMetadata
Sourcepub fn tool_metadata(&self, tool_name: &str) -> Option<&Value>
pub fn tool_metadata(&self, tool_name: &str) -> Option<&Value>
Get value of the [tool.*] section in this package’s manifest, for specific tool_name,
including any transformations applied by Scarb.
Trait Implementations§
Source§impl Clone for PackageMetadata
impl Clone for PackageMetadata
Source§fn clone(&self) -> PackageMetadata
fn clone(&self) -> PackageMetadata
Returns a duplicate 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 moreSource§impl Debug for PackageMetadata
impl Debug for PackageMetadata
Source§impl<'de> Deserialize<'de> for PackageMetadata
impl<'de> Deserialize<'de> for PackageMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PackageMetadata
impl PartialEq for PackageMetadata
Source§impl Serialize for PackageMetadata
impl Serialize for PackageMetadata
impl Eq for PackageMetadata
impl StructuralPartialEq for PackageMetadata
Auto Trait Implementations§
impl Freeze for PackageMetadata
impl RefUnwindSafe for PackageMetadata
impl Send for PackageMetadata
impl Sync for PackageMetadata
impl Unpin for PackageMetadata
impl UnwindSafe for PackageMetadata
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