Struct cargo_util_schemas::manifest::TomlManifest
source · pub struct TomlManifest {Show 22 fields
pub cargo_features: Option<Vec<String>>,
pub package: Option<Box<TomlPackage>>,
pub project: Option<Box<TomlPackage>>,
pub profile: Option<TomlProfiles>,
pub lib: Option<TomlLibTarget>,
pub bin: Option<Vec<TomlBinTarget>>,
pub example: Option<Vec<TomlExampleTarget>>,
pub test: Option<Vec<TomlTestTarget>>,
pub bench: Option<Vec<TomlTestTarget>>,
pub dependencies: Option<BTreeMap<PackageName, InheritableDependency>>,
pub dev_dependencies: Option<BTreeMap<PackageName, InheritableDependency>>,
pub dev_dependencies2: Option<BTreeMap<PackageName, InheritableDependency>>,
pub build_dependencies: Option<BTreeMap<PackageName, InheritableDependency>>,
pub build_dependencies2: Option<BTreeMap<PackageName, InheritableDependency>>,
pub features: Option<BTreeMap<FeatureName, Vec<String>>>,
pub target: Option<BTreeMap<String, TomlPlatform>>,
pub replace: Option<BTreeMap<String, TomlDependency>>,
pub patch: Option<BTreeMap<String, BTreeMap<PackageName, TomlDependency>>>,
pub workspace: Option<TomlWorkspace>,
pub badges: Option<BTreeMap<String, BTreeMap<String, String>>>,
pub lints: Option<InheritableLints>,
pub _unused_keys: BTreeSet<String>,
}
Expand description
This type is used to deserialize Cargo.toml
files.
Fields§
§cargo_features: Option<Vec<String>>
§package: Option<Box<TomlPackage>>
§project: Option<Box<TomlPackage>>
§profile: Option<TomlProfiles>
§lib: Option<TomlLibTarget>
§bin: Option<Vec<TomlBinTarget>>
§example: Option<Vec<TomlExampleTarget>>
§test: Option<Vec<TomlTestTarget>>
§bench: Option<Vec<TomlTestTarget>>
§dependencies: Option<BTreeMap<PackageName, InheritableDependency>>
§dev_dependencies: Option<BTreeMap<PackageName, InheritableDependency>>
§dev_dependencies2: Option<BTreeMap<PackageName, InheritableDependency>>
§build_dependencies: Option<BTreeMap<PackageName, InheritableDependency>>
§build_dependencies2: Option<BTreeMap<PackageName, InheritableDependency>>
§features: Option<BTreeMap<FeatureName, Vec<String>>>
§target: Option<BTreeMap<String, TomlPlatform>>
§replace: Option<BTreeMap<String, TomlDependency>>
§patch: Option<BTreeMap<String, BTreeMap<PackageName, TomlDependency>>>
§workspace: Option<TomlWorkspace>
§badges: Option<BTreeMap<String, BTreeMap<String, String>>>
§lints: Option<InheritableLints>
§_unused_keys: BTreeSet<String>
Report unused keys (see also nested _unused_keys
)
Note: this is populated by the caller, rather than automatically
Implementations§
source§impl TomlManifest
impl TomlManifest
pub fn requires_package(&self) -> impl Iterator<Item = &'static str>
pub fn has_profiles(&self) -> bool
pub fn package(&self) -> Option<&Box<TomlPackage>>
pub fn dev_dependencies( &self, ) -> Option<&BTreeMap<PackageName, InheritableDependency>>
pub fn build_dependencies( &self, ) -> Option<&BTreeMap<PackageName, InheritableDependency>>
pub fn features(&self) -> Option<&BTreeMap<FeatureName, Vec<String>>>
pub fn normalized_lints(&self) -> Result<Option<&TomlLints>, UnresolvedError>
Trait Implementations§
source§impl Clone for TomlManifest
impl Clone for TomlManifest
source§fn clone(&self) -> TomlManifest
fn clone(&self) -> TomlManifest
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 TomlManifest
impl Debug for TomlManifest
source§impl Default for TomlManifest
impl Default for TomlManifest
source§fn default() -> TomlManifest
fn default() -> TomlManifest
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TomlManifest
impl<'de> Deserialize<'de> for TomlManifest
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 TomlManifest
impl RefUnwindSafe for TomlManifest
impl Send for TomlManifest
impl Sync for TomlManifest
impl Unpin for TomlManifest
impl UnwindSafe for TomlManifest
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1376 bytes