pub struct CargoMetadata {
pub name: String,
pub version: String,
pub binaries: Vec<BinaryTarget>,
pub has_lib: bool,
pub lib_name: Option<String>,
pub examples: Vec<String>,
pub edition: String,
pub is_workspace: bool,
pub workspace_members: Vec<String>,
}Expand description
Parsed metadata from Cargo.toml.
Fields§
§name: StringPackage name
version: StringPackage version
binaries: Vec<BinaryTarget>List of binary targets
has_lib: boolWhether this is a library
lib_name: Option<String>Library name (if different from package name)
examples: Vec<String>List of examples
edition: StringEdition (2021, 2024, etc.)
is_workspace: boolWhether this is a workspace root
workspace_members: Vec<String>Workspace members (if workspace)
Implementations§
Source§impl CargoMetadata
impl CargoMetadata
Trait Implementations§
Source§impl Clone for CargoMetadata
impl Clone for CargoMetadata
Source§fn clone(&self) -> CargoMetadata
fn clone(&self) -> CargoMetadata
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 CargoMetadata
impl Debug for CargoMetadata
Source§impl<'de> Deserialize<'de> for CargoMetadata
impl<'de> Deserialize<'de> for CargoMetadata
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
Auto Trait Implementations§
impl Freeze for CargoMetadata
impl RefUnwindSafe for CargoMetadata
impl Send for CargoMetadata
impl Sync for CargoMetadata
impl Unpin for CargoMetadata
impl UnsafeUnpin for CargoMetadata
impl UnwindSafe for CargoMetadata
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