Struct scarb_metadata::TargetMetadata
source · #[non_exhaustive]pub struct TargetMetadata {
pub kind: String,
pub name: String,
pub source_path: Utf8PathBuf,
pub params: Value,
pub extra: HashMap<String, Value>,
}
Expand description
Package target information.
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.kind: String
Target kind: lib
, starknet-contract
, etc.
name: String
Target name, often this is a default, which is the package name.
source_path: Utf8PathBuf
Path to the main source file of the target.
params: Value
Unstructured target parameters, excluding default values.
Default values are omitted because they are unknown to Scarb, they are applied by compilers.
extra: HashMap<String, Value>
Additional data not captured by deserializer.
Implementations§
source§impl TargetMetadata
impl TargetMetadata
sourcepub fn source_root(&self) -> &Utf8Path
pub fn source_root(&self) -> &Utf8Path
Path to the main source directory of the target.
Trait Implementations§
source§impl Clone for TargetMetadata
impl Clone for TargetMetadata
source§fn clone(&self) -> TargetMetadata
fn clone(&self) -> TargetMetadata
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 moresource§impl Debug for TargetMetadata
impl Debug for TargetMetadata
source§impl<'de> Deserialize<'de> for TargetMetadata
impl<'de> Deserialize<'de> for TargetMetadata
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 TargetMetadata
impl PartialEq for TargetMetadata
source§fn eq(&self, other: &TargetMetadata) -> bool
fn eq(&self, other: &TargetMetadata) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TargetMetadata
impl Serialize for TargetMetadata
impl Eq for TargetMetadata
impl StructuralPartialEq for TargetMetadata
Auto Trait Implementations§
impl Freeze for TargetMetadata
impl RefUnwindSafe for TargetMetadata
impl Send for TargetMetadata
impl Sync for TargetMetadata
impl Unpin for TargetMetadata
impl UnwindSafe for TargetMetadata
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