| 1 | #![forbid(unsafe_code)] |
| 2 | #![allow(clippy::inline_always)] |
| 3 | #![allow(clippy::missing_errors_doc)] |
| 4 | #![allow(clippy::needless_for_each)] |
| 5 | #![allow(clippy::new_without_default)] |
| 6 | #![allow(clippy::redundant_closure_for_method_calls)] |
| 7 | #![allow(clippy::trivially_copy_pass_by_ref)] |
| 8 | #![cfg_attr(docsrs, feature(doc_cfg))] |
| 9 | |
| 10 | //! This crate defines `struct`s that can be deserialized with Serde |
| 11 | //! to load and inspect `Cargo.toml` metadata. |
| 12 | //! |
| 13 | //! See [`Manifest::from_path`]. Note that `Cargo.toml` files are not self-contained. Correct interpretation of the manifest requires other files on disk: |
| 14 | //! |
| 15 | //! * List of files in order to auto-discover binaries, examples, benchmarks, and tests. |
| 16 | //! * Potentially a `Manifest` from one of parent directories, that acts as a workspace root for inheritance of shared workspace information. |
| 17 | //! |
| 18 | //! Because of this filesystem-dependence, loading `Cargo.toml` [from a string](`Manifest::from_str`) is [an advanced operation](`Manifest::complete_from_abstract_filesystem`). |
| 19 | //! The crate has methods for processing this information, but if you don't already have a full crate on disk, you will need to write some glue code to obtain it. See [`Manifest::complete_from_path_and_workspace`]. |
| 20 | |
| 21 | use serderust-analyzer cargo serde 1.0.229 crate/::{Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#, Deserializerrust-analyzer cargo serde_core 1.0.229 de/Deserializer#, Serializerust-analyzer cargo serde_core 1.0.229 ser/Serialize#, Serializerrust-analyzer cargo serde_core 1.0.229 ser/Serializer#}; |
| 22 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::{BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#, BTreeSetrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/BTreeSet#}; |
| 23 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#; |
| 24 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/take().; |
| 25 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/::{Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#, PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#}; |
| 26 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{fsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std fs/, iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/}; |
| 27 | pub use tomlrust-analyzer cargo toml 1.1.4+spec-1.1.0 crate/::Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#; |
| 28 | |
| 29 | /// Dependencies. The keys in this map are not always crate names, this can be overriden by the `package` field, and there may be multiple copies of the same crate. |
| 30 | /// |
| 31 | /// Optional dependencies may create implicit features, see the [`features`] module for dealing with this. |
| 32 | pub type DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet# = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Dependencyrust-analyzer cargo cargo_toml 0.22.3 Dependency#>; |
| 33 | /// Config target (see [`parse_cfg`](https://lib.rs/parse_cfg) crate) + deps for the target. |
| 34 | pub type TargetDepsSetrust-analyzer cargo cargo_toml 0.22.3 TargetDepsSet# = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Targetrust-analyzer cargo cargo_toml 0.22.3 Target#>; |
| 35 | /// The `[features]` section. This set may be incomplete! |
| 36 | /// |
| 37 | /// The `default` is special, and there may be more features |
| 38 | /// implied by optional dependencies. |
| 39 | /// See the [`features`] module for more info. |
| 40 | pub type FeatureSetrust-analyzer cargo cargo_toml 0.22.3 FeatureSet# = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>; |
| 41 | /// Locally replace dependencies |
| 42 | pub type PatchSetrust-analyzer cargo cargo_toml 0.22.3 PatchSet# = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet#>; |
| 43 | /// A set of lints. |
| 44 | pub type LintSetrust-analyzer cargo cargo_toml 0.22.3 LintSet# = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Lintrust-analyzer cargo cargo_toml 0.22.3 Lint#>; |
| 45 | /// Lint groups such as [lints.rust]. |
| 46 | pub type LintGroupsrust-analyzer cargo cargo_toml 0.22.3 LintGroups# = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, LintSetrust-analyzer cargo cargo_toml 0.22.3 LintSet#>; |
| 47 | |
| 48 | mod afsrust-analyzer cargo cargo_toml 0.22.3 afs/; |
| 49 | mod errorrust-analyzer cargo cargo_toml 0.22.3 error/; |
| 50 | mod inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/; |
| 51 | pub use craterust-analyzer cargo cargo_toml 0.22.3 crate/::afsrust-analyzer cargo cargo_toml 0.22.3 afs/::*; |
| 52 | pub use craterust-analyzer cargo cargo_toml 0.22.3 crate/::errorrust-analyzer cargo cargo_toml 0.22.3 error/::Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#; |
| 53 | pub use craterust-analyzer cargo cargo_toml 0.22.3 crate/::inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/::Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#; |
| 54 | |
| 55 | #[cfg(feature = "features")] |
| 56 | #[cfg_attr(docsrs, doc(cfg(feature = "features")))] |
| 57 | pub mod featuresrust-analyzer cargo cargo_toml 0.22.3 features/; |
| 58 | |
| 59 | /// The top-level `Cargo.toml` structure. **This is the main type in this library.** |
| 60 | /// |
| 61 | /// The `Metadata` is a generic type for `[package.metadata]` table. You can replace it with |
| 62 | /// your own struct type if you use the metadata and don't want to use the catch-all `Value` type. |
| 63 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 64 | #[serde(rename_all = "kebab-case")] |
| 65 | pub struct Manifestrust-analyzer cargo cargo_toml 0.22.3 Manifest#<Metadata = Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#> { |
| 66 | /// Package definition (a cargo crate) |
| 67 | pub packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Packagerust-analyzer cargo cargo_toml 0.22.3 Package#<Metadata>>, |
| 68 | |
| 69 | /// Workspace-wide settings |
| 70 | pub workspacerust-analyzer cargo cargo_toml 0.22.3 Manifest#workspace.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Workspacerust-analyzer cargo cargo_toml 0.22.3 Workspace#<Metadata>>, |
| 71 | |
| 72 | /// Normal dependencies |
| 73 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "DepsSet::is_empty")] |
| 74 | pub dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#dependencies.: DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet#, |
| 75 | |
| 76 | /// Dev/test-only deps |
| 77 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "DepsSet::is_empty")] |
| 78 | pub dev_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#dev_dependencies.: DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet#, |
| 79 | |
| 80 | /// Build-time deps |
| 81 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "DepsSet::is_empty")] |
| 82 | pub build_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#build_dependencies.: DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet#, |
| 83 | |
| 84 | /// `[target.cfg.dependencies]` |
| 85 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "TargetDepsSet::is_empty")] |
| 86 | pub targetrust-analyzer cargo cargo_toml 0.22.3 Manifest#target.: TargetDepsSetrust-analyzer cargo cargo_toml 0.22.3 TargetDepsSet#, |
| 87 | |
| 88 | /// The `[features]` section. This set may be incomplete! |
| 89 | /// |
| 90 | /// Optional dependencies may create implied Cargo features. |
| 91 | /// This features section also supports microsyntax with `dep:`, `/`, and `?` |
| 92 | /// for managing dependencies and their features.io |
| 93 | /// |
| 94 | /// This crate has an optional [`features`] module for dealing with this |
| 95 | /// complexity and getting the real list of features. |
| 96 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "FeatureSet::is_empty", deserialize_with = "feature_set")] |
| 97 | pub featuresrust-analyzer cargo cargo_toml 0.22.3 Manifest#features.: FeatureSetrust-analyzer cargo cargo_toml 0.22.3 FeatureSet#, |
| 98 | |
| 99 | /// Obsolete |
| 100 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "DepsSet::is_empty")] |
| 101 | #[deprecated(note = "Cargo recommends patch instead")] |
| 102 | pub replacerust-analyzer cargo cargo_toml 0.22.3 Manifest#replace.: DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet#, |
| 103 | |
| 104 | /// `[patch.crates-io]` section |
| 105 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "PatchSet::is_empty")] |
| 106 | pub patchrust-analyzer cargo cargo_toml 0.22.3 Manifest#patch.: PatchSetrust-analyzer cargo cargo_toml 0.22.3 PatchSet#, |
| 107 | |
| 108 | /// Note that due to autolibs feature this is not the complete list |
| 109 | /// unless you run [`Manifest::complete_from_path`] |
| 110 | pub librust-analyzer cargo cargo_toml 0.22.3 Manifest#lib.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Productrust-analyzer cargo cargo_toml 0.22.3 Product#>, |
| 111 | |
| 112 | /// Compilation/optimization settings |
| 113 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Profiles::should_skip_serializing")] |
| 114 | pub profilerust-analyzer cargo cargo_toml 0.22.3 Manifest#profile.: Profilesrust-analyzer cargo cargo_toml 0.22.3 Profiles#, |
| 115 | |
| 116 | /// `[badges]` section |
| 117 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Badges::should_skip_serializing")] |
| 118 | pub badgesrust-analyzer cargo cargo_toml 0.22.3 Manifest#badges.: Badgesrust-analyzer cargo cargo_toml 0.22.3 Badges#, |
| 119 | |
| 120 | /// Note that due to autobins feature this is not the complete list |
| 121 | /// unless you run [`Manifest::complete_from_path`] |
| 122 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 123 | pub binrust-analyzer cargo cargo_toml 0.22.3 Manifest#bin.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Productrust-analyzer cargo cargo_toml 0.22.3 Product#>, |
| 124 | |
| 125 | /// Benchmarks |
| 126 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 127 | pub benchrust-analyzer cargo cargo_toml 0.22.3 Manifest#bench.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Productrust-analyzer cargo cargo_toml 0.22.3 Product#>, |
| 128 | |
| 129 | /// Integration tests |
| 130 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 131 | pub testrust-analyzer cargo cargo_toml 0.22.3 Manifest#test.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Productrust-analyzer cargo cargo_toml 0.22.3 Product#>, |
| 132 | |
| 133 | /// Examples |
| 134 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 135 | pub examplerust-analyzer cargo cargo_toml 0.22.3 Manifest#example.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Productrust-analyzer cargo cargo_toml 0.22.3 Product#>, |
| 136 | |
| 137 | /// Lints |
| 138 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Inheritable::<LintGroups>::is_empty")] |
| 139 | pub lintsrust-analyzer cargo cargo_toml 0.22.3 Manifest#lints.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<LintGroupsrust-analyzer cargo cargo_toml 0.22.3 LintGroups#>, |
| 140 | } |
| 141 | |
| 142 | /// A manifest can contain both a package and workspace-wide properties |
| 143 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 144 | #[serde(rename_all = "kebab-case")] |
| 145 | pub struct Workspacerust-analyzer cargo cargo_toml 0.22.3 Workspace#<Metadata = Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#> { |
| 146 | /// Relative paths of crates in here |
| 147 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default)] |
| 148 | pub membersrust-analyzer cargo cargo_toml 0.22.3 Workspace#members.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 149 | |
| 150 | /// Members to operate on when in the workspace root. |
| 151 | /// |
| 152 | /// When specified, `default-members` must expand to a subset of `members`. |
| 153 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 154 | pub default_membersrust-analyzer cargo cargo_toml 0.22.3 Workspace#default_members.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 155 | |
| 156 | /// Template for inheritance |
| 157 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 158 | pub packagerust-analyzer cargo cargo_toml 0.22.3 Workspace#package.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<PackageTemplaterust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#>, |
| 159 | |
| 160 | /// Ignore these dirs |
| 161 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 162 | pub excluderust-analyzer cargo cargo_toml 0.22.3 Workspace#exclude.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 163 | |
| 164 | /// Shared info |
| 165 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 166 | pub metadatarust-analyzer cargo cargo_toml 0.22.3 Workspace#metadata.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Metadata>, |
| 167 | |
| 168 | /// Compatibility setting |
| 169 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 170 | pub resolverrust-analyzer cargo cargo_toml 0.22.3 Workspace#resolver.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Resolverrust-analyzer cargo cargo_toml 0.22.3 Resolver#>, |
| 171 | |
| 172 | /// Template for `needs_workspace_inheritance` |
| 173 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "DepsSet::is_empty")] |
| 174 | pub dependenciesrust-analyzer cargo cargo_toml 0.22.3 Workspace#dependencies.: DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet#, |
| 175 | |
| 176 | /// Workspace-level lint groups |
| 177 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "LintGroups::is_empty")] |
| 178 | pub lintsrust-analyzer cargo cargo_toml 0.22.3 Workspace#lints.: LintGroupsrust-analyzer cargo cargo_toml 0.22.3 LintGroups#, |
| 179 | } |
| 180 | |
| 181 | /// Workspace can predefine properties that can be inherited via `{ workspace = true }` in its member packages. |
| 182 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 183 | #[serde(rename_all = "kebab-case")] |
| 184 | #[non_exhaustive] |
| 185 | pub struct PackageTemplaterust-analyzer cargo cargo_toml 0.22.3 PackageTemplate# { |
| 186 | /// Deprecated |
| 187 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 188 | pub authorsrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#authors.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 189 | |
| 190 | /// See <https://crates.io/category_slugs> |
| 191 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 192 | pub categoriesrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#categories.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 193 | |
| 194 | /// Multi-line text, some people use Markdown here |
| 195 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 196 | pub descriptionrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#description.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 197 | |
| 198 | /// URL |
| 199 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 200 | pub documentationrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#documentation.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 201 | |
| 202 | /// Opt-in to new Rust behaviors |
| 203 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 204 | pub editionrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#edition.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Editionrust-analyzer cargo cargo_toml 0.22.3 Edition#>, |
| 205 | |
| 206 | /// Don't publish these files, relative to workspace |
| 207 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 208 | pub excluderust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#exclude.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 209 | |
| 210 | /// Homepage URL |
| 211 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 212 | pub homepagerust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#homepage.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 213 | |
| 214 | /// Publish these files, relative to workspace |
| 215 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 216 | pub includerust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#include.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 217 | |
| 218 | /// For search |
| 219 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 220 | pub keywordsrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#keywords.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 221 | |
| 222 | /// SPDX |
| 223 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 224 | pub licenserust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#license.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 225 | |
| 226 | /// If not SPDX |
| 227 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 228 | pub license_filerust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#license_file.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#>, |
| 229 | |
| 230 | /// Block publishing or choose custom registries |
| 231 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Publish::is_default")] |
| 232 | pub publishrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#publish.: Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#, |
| 233 | |
| 234 | /// Opt-out or custom path, relative to workspace |
| 235 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "OptionalFile::is_default")] |
| 236 | pub readmerust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#readme.: OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#, |
| 237 | |
| 238 | /// (HTTPS) repository URL |
| 239 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 240 | pub repositoryrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#repository.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 241 | |
| 242 | /// Minimum required rustc version in format `1.99` |
| 243 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 244 | pub rust_versionrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#rust_version.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 245 | |
| 246 | /// Package version semver |
| 247 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 248 | pub versionrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#version.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 249 | } |
| 250 | |
| 251 | fn default_truerust-analyzer cargo cargo_toml 0.22.3 default_true().() -> bool { |
| 252 | true |
| 253 | } |
| 254 | |
| 255 | fn is_truerust-analyzer cargo cargo_toml 0.22.3 is_true().(val: &bool) -> bool { |
| 256 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().val |
| 257 | } |
| 258 | |
| 259 | fn is_falserust-analyzer cargo cargo_toml 0.22.3 is_false().(val: &bool) -> bool { |
| 260 | !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().val |
| 261 | } |
| 262 | |
| 263 | impl Manifestrust-analyzer cargo cargo_toml 0.22.3 Manifest#<Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#> { |
| 264 | /// Parse contents from a `Cargo.toml` file on disk. |
| 265 | /// |
| 266 | /// Calls [`Manifest::complete_from_path`] to discover implicit binaries, etc. |
| 267 | /// If needed, it will search the file system for a workspace, and fill in data inherited from the workspace. |
| 268 | #[inline] |
| 269 | pub fn from_pathrust-analyzer cargo cargo_toml 0.22.3 impl#[Manifest]from_path().(cargo_toml_path: impl AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Manifest], Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 270 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Manifest]::from_path_with_metadatarust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]from_path_with_metadata().(cargo_toml_path) |
| 271 | } |
| 272 | |
| 273 | /// Warning: this will make an incomplete manifest, which will be missing data and panic when using workspace inheritance. |
| 274 | /// |
| 275 | /// Parse contents of a `Cargo.toml` file already loaded as a byte slice. It's **not** a file name, but file's TOML-syntax content. |
| 276 | /// |
| 277 | /// If you don't call [`Manifest::complete_from_path`], it may be missing implicit data, and panic if workspace inheritance is used. |
| 278 | #[inline(always)] |
| 279 | pub fn from_slicerust-analyzer cargo cargo_toml 0.22.3 impl#[Manifest]from_slice().(cargo_toml_content: &[u8]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Manifest], Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 280 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Manifest]::from_slice_with_metadatarust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]from_slice_with_metadata().(cargo_toml_content) |
| 281 | } |
| 282 | |
| 283 | /// Warning: this will make an incomplete manifest, which will be missing data and panic when using workspace inheritance. |
| 284 | /// |
| 285 | /// It parses contents of a `Cargo.toml` file loaded as a string. It's **not** a file name, but file's TOML-syntax content. |
| 286 | /// |
| 287 | /// For a more reliable method, see `from_path`. |
| 288 | /// |
| 289 | /// If you don't call [`Manifest::complete_from_path`], it may be missing implicit data, and panic if workspace inheritance is used. |
| 290 | #[inline(always)] |
| 291 | #[allow(clippy::should_implement_trait)] |
| 292 | pub fn from_strrust-analyzer cargo cargo_toml 0.22.3 impl#[Manifest]from_str().(cargo_toml_content: &str) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Manifest], Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 293 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Manifest]::from_slice_with_metadata_strrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]from_slice_with_metadata_str().(cargo_toml_content) |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | impl<Metadata: for<'a> Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#<'a>> Manifestrust-analyzer cargo cargo_toml 0.22.3 Manifest#<Metadata> { |
| 298 | /// Warning: this will make an incomplete manifest, which will be missing data and panic when using workspace inheritance. |
| 299 | /// |
| 300 | /// Parse `Cargo.toml`, and parse its `[package.metadata]` into a custom Serde-compatible type. |
| 301 | /// |
| 302 | /// It does not call [`Manifest::complete_from_path`], so may be missing implicit data. |
| 303 | #[inline] |
| 304 | pub fn from_slice_with_metadatarust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]from_slice_with_metadata().(cargo_toml_content: &[u8]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`], Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 305 | let cargo_toml_content = stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/::from_utf8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/converts/from_utf8().(cargo_toml_content).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("utf8"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 306 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]::from_slice_with_metadata_strrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]from_slice_with_metadata_str().(cargo_toml_content) |
| 307 | } |
| 308 | |
| 309 | #[inline(never)] |
| 310 | fn from_slice_with_metadata_strrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]from_slice_with_metadata_str().(cargo_toml_content: &str) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`], Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 311 | let mut manifest: Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`] = tomlrust-analyzer cargo toml 1.1.4+spec-1.1.0 crate/::from_strrust-analyzer cargo toml 1.1.4+spec-1.1.0 de/from_str().(cargo_toml_content)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 312 | |
| 313 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(package) = &mut manifest.packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package. { |
| 314 | // This is a clumsy implementation of Cargo's rule that missing version defaults publish to false. |
| 315 | // Serde just doesn't support such relationship for default field values, so this will be incorrect |
| 316 | // for explicit `version = "0.0.0"` and `publish = true`. |
| 317 | if package.versionrust-analyzer cargo cargo_toml 0.22.3 Package#version..getrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]get().().is_ok_andrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_ok_and().(|v| v rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq()."0.0.0") && package.publishrust-analyzer cargo cargo_toml 0.22.3 Package#publish..getrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]get().().is_ok_andrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_ok_and().(|p| p.is_defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Publish]is_default().()) { |
| 318 | package.publishrust-analyzer cargo cargo_toml 0.22.3 Package#publish. = Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#(Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#::Flagrust-analyzer cargo cargo_toml 0.22.3 Publish#Flag#(false)); |
| 319 | } |
| 320 | } |
| 321 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(manifest) |
| 322 | } |
| 323 | |
| 324 | /// Parse contents from `Cargo.toml` file on disk, with custom Serde-compatible metadata type. |
| 325 | /// |
| 326 | /// Calls [`Manifest::complete_from_path`], so it will load a workspace if necessary. |
| 327 | pub fn from_path_with_metadatarust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]from_path_with_metadata().<P: AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#>>(cargo_toml_path: P) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`], Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 328 | let cargo_toml_path = cargo_toml_path.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().(); |
| 329 | let cargo_toml_content = fsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std fs/::read_to_stringrust-analyzer cargo std https://github.com/rust-lang/rust/library/std fs/read_to_string().(cargo_toml_path)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 330 | let mut manifest = Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]::from_slice_with_metadata_strrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]from_slice_with_metadata_str().(&cargo_toml_content)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 331 | manifest.complete_from_pathrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]complete_from_path().(cargo_toml_path)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 332 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(manifest) |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | impl<Metadata> Manifestrust-analyzer cargo cargo_toml 0.22.3 Manifest#<Metadata> { |
| 337 | /// `Cargo.toml` doesn't contain explicit information about `[lib]` and `[[bin]]`, |
| 338 | /// which are inferred based on files on disk. |
| 339 | /// |
| 340 | /// This scans the disk to make the data in the manifest as complete as possible. |
| 341 | /// |
| 342 | /// It supports workspace inheritance and will search for a root workspace. |
| 343 | /// Use [`Manifest::complete_from_path_and_workspace`] to provide the workspace explicitly. |
| 344 | pub fn complete_from_pathrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]complete_from_path().(&mut self, path: &Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 345 | let manifest_dir = path.parentrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]parent().().ok_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]ok_or().(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("bad path"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 346 | self.complete_from_abstract_filesystemrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]complete_from_abstract_filesystem().::<Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#, _>(Filesystemrust-analyzer cargo cargo_toml 0.22.3 afs/Filesystem#::newrust-analyzer cargo cargo_toml 0.22.3 afs/impl#[`Filesystem<'a>`]new().(manifest_dir), Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#) |
| 347 | } |
| 348 | |
| 349 | /// [`Manifest::complete_from_path`], but allows passing workspace manifest explicitly. |
| 350 | /// |
| 351 | /// `workspace_manifest_and_path` is the root workspace manifest already parsed, |
| 352 | /// and the path is the path to the root workspace's directory. |
| 353 | /// If it's `None`, the root workspace will be discovered automatically. |
| 354 | pub fn complete_from_path_and_workspacerust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]complete_from_path_and_workspace().<PackageMetadataTypeDoesNotMatterHere>(&mut self, package_manifest_path: &Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#, workspace_manifest_and_path: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(&Manifestrust-analyzer cargo cargo_toml 0.22.3 Manifest#<PackageMetadataTypeDoesNotMatterHere>, &Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#)>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 355 | let manifest_dir = package_manifest_path.parentrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]parent().().ok_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]ok_or().(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("bad path"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 356 | self.complete_from_abstract_filesystemrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]complete_from_abstract_filesystem().(Filesystemrust-analyzer cargo cargo_toml 0.22.3 afs/Filesystem#::newrust-analyzer cargo cargo_toml 0.22.3 afs/impl#[`Filesystem<'a>`]new().(manifest_dir), workspace_manifest_and_path) |
| 357 | } |
| 358 | |
| 359 | /// `Cargo.toml` doesn't contain explicit information about `[lib]` and `[[bin]]`, |
| 360 | /// which are inferred based on files on disk. |
| 361 | /// |
| 362 | /// You can provide any implementation of directory scan, which doesn't have to |
| 363 | /// be reading straight from disk (might scan a tarball or a git repo, for example). |
| 364 | /// |
| 365 | /// If `workspace_manifest_and_path` is set, it will inherit from this workspace. |
| 366 | /// If it's `None`, it will try to find a workspace if needed. |
| 367 | /// |
| 368 | /// Call it like `complete_from_abstract_filesystem::<cargo_toml::Value, _>(…)` if the arguments are ambiguous. |
| 369 | pub fn complete_from_abstract_filesystemrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]complete_from_abstract_filesystem().<PackageMetadataTypeDoesNotMatterHere, Fs: AbstractFilesystemrust-analyzer cargo cargo_toml 0.22.3 afs/AbstractFilesystem#>( |
| 370 | &mut self, fs: Fs, workspace_manifest_and_path: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(&Manifestrust-analyzer cargo cargo_toml 0.22.3 Manifest#<PackageMetadataTypeDoesNotMatterHere>, &Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#)>, |
| 371 | ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 372 | let tmp; |
| 373 | let err_path; |
| 374 | let res = if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((ws, ws_path)) = workspace_manifest_and_path { |
| 375 | err_path = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ws_path); |
| 376 | self._inherit_workspacerust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]_inherit_workspace().(ws.workspacerust-analyzer cargo cargo_toml 0.22.3 Manifest#workspace..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().(), ws_path) |
| 377 | } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ws) = self.workspacerust-analyzer cargo cargo_toml 0.22.3 Manifest#workspace..takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]take().() { |
| 378 | err_path = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]new().("")); |
| 379 | // Manifest may be both a workspace and a package |
| 380 | let res = self._inherit_workspacerust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]_inherit_workspace().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&ws), Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]new().("")); |
| 381 | self.workspacerust-analyzer cargo cargo_toml 0.22.3 Manifest#workspace. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ws); |
| 382 | res |
| 383 | } else if self.needs_workspace_inheritancerust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]needs_workspace_inheritance().() { |
| 384 | let ws_path_hint = self.packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]and_then().(|p| p.workspacerust-analyzer cargo cargo_toml 0.22.3 Package#workspace..as_derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_deref().()); |
| 385 | match fs.parse_root_workspacerust-analyzer cargo cargo_toml 0.22.3 afs/AbstractFilesystem#parse_root_workspace().(ws_path_hint) { |
| 386 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((ws_manifest, base_path)) => { |
| 387 | tmp = base_path; |
| 388 | err_path = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&tmp); |
| 389 | self._inherit_workspacerust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]_inherit_workspace().(ws_manifest.workspacerust-analyzer cargo cargo_toml 0.22.3 Manifest#workspace..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().(), &tmp) |
| 390 | }, |
| 391 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(e) => { |
| 392 | err_path = if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(p) = ws_path_hint { tmp = p.to_ownedrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path][ToOwned]to_owned().(); Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&tmp) } else { Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# }; |
| 393 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(e) |
| 394 | }, |
| 395 | } |
| 396 | } else { |
| 397 | err_path = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; |
| 398 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 399 | }; |
| 400 | |
| 401 | match res.and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]and_then().(|()| self.complete_from_abstract_filesystem_innerrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]complete_from_abstract_filesystem_inner().(&fs)) { |
| 402 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()), |
| 403 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(e @ Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Workspacerust-analyzer cargo cargo_toml 0.22.3 error/Error#Workspace#(_)) => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(e), |
| 404 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(e) => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Workspacerust-analyzer cargo cargo_toml 0.22.3 error/Error#Workspace#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().((e, err_path.maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#::fromrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[PathBuf][`From<&T>`]from().))))), |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | /// If `true`, some fields are unavailable. If `false`, it's fully usable as-is. |
| 409 | /// |
| 410 | /// It is `false` in manifests that use workspace inheritance, but had their data completed from the root manifest already. |
| 411 | pub fn needs_workspace_inheritancerust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]needs_workspace_inheritance().(&self) -> bool { |
| 412 | self.packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().is_some_andrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some_and().(Packagerust-analyzer cargo cargo_toml 0.22.3 Package#::needs_workspace_inheritancerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]needs_workspace_inheritance().) || |
| 413 | !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.lintsrust-analyzer cargo cargo_toml 0.22.3 Manifest#lints..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().() || |
| 414 | self.dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#dependencies..valuesrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]values().() |
| 415 | .chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(self.build_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#build_dependencies..valuesrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]values().()) |
| 416 | .chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(self.dev_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#dev_dependencies..valuesrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]values().()) |
| 417 | .anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#any().(|dep| { |
| 418 | matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(dep, Dependencyrust-analyzer cargo cargo_toml 0.22.3 Dependency#::Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(_)) |
| 419 | }) |
| 420 | } |
| 421 | |
| 422 | fn _inherit_workspacerust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]_inherit_workspace().<Ignored>(&mut self, workspace: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&Workspacerust-analyzer cargo cargo_toml 0.22.3 Workspace#<Ignored>>, workspace_base_path: &Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 423 | let workspace_base_path = if workspace_base_path.file_namerust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]file_name().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Cargo.toml".as_refrust-analyzer cargo std https://github.com/rust-lang/rust/library/std ffi/os_str/impl#[str][`AsRef<OsStr>`]as_ref().()) { |
| 424 | workspace_base_path.parentrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]parent().().ok_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]ok_or().(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("bad path"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). |
| 425 | } else { |
| 426 | workspace_base_path |
| 427 | }; |
| 428 | |
| 429 | inherit_dependenciesrust-analyzer cargo cargo_toml 0.22.3 inherit_dependencies().(&mut self.dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#dependencies., workspace, workspace_base_path)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 430 | inherit_dependenciesrust-analyzer cargo cargo_toml 0.22.3 inherit_dependencies().(&mut self.build_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#build_dependencies., workspace, workspace_base_path)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 431 | inherit_dependenciesrust-analyzer cargo cargo_toml 0.22.3 inherit_dependencies().(&mut self.dev_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#dev_dependencies., workspace, workspace_base_path)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 432 | |
| 433 | for target in self.targetrust-analyzer cargo cargo_toml 0.22.3 Manifest#target..values_mutrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]values_mut().() { |
| 434 | inherit_dependenciesrust-analyzer cargo cargo_toml 0.22.3 inherit_dependencies().(&mut target.dependenciesrust-analyzer cargo cargo_toml 0.22.3 Target#dependencies., workspace, workspace_base_path)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 435 | inherit_dependenciesrust-analyzer cargo cargo_toml 0.22.3 inherit_dependencies().(&mut target.build_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Target#build_dependencies., workspace, workspace_base_path)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 436 | inherit_dependenciesrust-analyzer cargo cargo_toml 0.22.3 inherit_dependencies().(&mut target.dev_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Target#dev_dependencies., workspace, workspace_base_path)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 437 | } |
| 438 | |
| 439 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ws) = workspace { |
| 440 | self.lintsrust-analyzer cargo cargo_toml 0.22.3 Manifest#lints..inheritrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]inherit().(&ws.lintsrust-analyzer cargo cargo_toml 0.22.3 Workspace#lints.); |
| 441 | } |
| 442 | |
| 443 | let package = match &mut self.packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package. { |
| 444 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(p) => p, |
| 445 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()), |
| 446 | }; |
| 447 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ws) = workspace.and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]and_then().(|w| w.packagerust-analyzer cargo cargo_toml 0.22.3 Workspace#package..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()) { |
| 448 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]::inherit_package_propertiesrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]inherit_package_properties().(package, ws, workspace_base_path)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 449 | } |
| 450 | |
| 451 | if package.needs_workspace_inheritancerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]needs_workspace_inheritance().() { |
| 452 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::WorkspaceIntegrityrust-analyzer cargo cargo_toml 0.22.3 error/Error#WorkspaceIntegrity#(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("not all fields of `{}` have been present in workspace.package", package.namerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]name().()))); |
| 453 | } |
| 454 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 455 | } |
| 456 | |
| 457 | fn inherit_package_propertiesrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]inherit_package_properties().(package: &mut Packagerust-analyzer cargo cargo_toml 0.22.3 Package#<Metadata>, ws: &PackageTemplaterust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#, workspace_base_path: &Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 458 | fn maybe_inheritrust-analyzer cargo cargo_toml 0.22.3 maybe_inherit().<T: Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#>(to: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<T>>, from: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&T>) { |
| 459 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(from) = from { |
| 460 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(to) = to { |
| 461 | to.inheritrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]inherit().(from); |
| 462 | } |
| 463 | } |
| 464 | } |
| 465 | fn inheritrust-analyzer cargo cargo_toml 0.22.3 inherit().<T: Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#>(to: &mut Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<T>, from: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&T>) { |
| 466 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(from) = from { |
| 467 | to.inheritrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]inherit().(from); |
| 468 | } |
| 469 | } |
| 470 | inheritrust-analyzer cargo cargo_toml 0.22.3 inherit().(&mut package.authorsrust-analyzer cargo cargo_toml 0.22.3 Package#authors., ws.authorsrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#authors..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 471 | inheritrust-analyzer cargo cargo_toml 0.22.3 inherit().(&mut package.categoriesrust-analyzer cargo cargo_toml 0.22.3 Package#categories., ws.categoriesrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#categories..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 472 | inheritrust-analyzer cargo cargo_toml 0.22.3 inherit().(&mut package.editionrust-analyzer cargo cargo_toml 0.22.3 Package#edition., ws.editionrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#edition..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 473 | inheritrust-analyzer cargo cargo_toml 0.22.3 inherit().(&mut package.excluderust-analyzer cargo cargo_toml 0.22.3 Package#exclude., ws.excluderust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#exclude..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 474 | inheritrust-analyzer cargo cargo_toml 0.22.3 inherit().(&mut package.includerust-analyzer cargo cargo_toml 0.22.3 Package#include., ws.includerust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#include..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 475 | inheritrust-analyzer cargo cargo_toml 0.22.3 inherit().(&mut package.keywordsrust-analyzer cargo cargo_toml 0.22.3 Package#keywords., ws.keywordsrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#keywords..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 476 | inheritrust-analyzer cargo cargo_toml 0.22.3 inherit().(&mut package.versionrust-analyzer cargo cargo_toml 0.22.3 Package#version., ws.versionrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#version..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 477 | maybe_inheritrust-analyzer cargo cargo_toml 0.22.3 maybe_inherit().(package.descriptionrust-analyzer cargo cargo_toml 0.22.3 Package#description..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_mut().(), ws.descriptionrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#description..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 478 | maybe_inheritrust-analyzer cargo cargo_toml 0.22.3 maybe_inherit().(package.documentationrust-analyzer cargo cargo_toml 0.22.3 Package#documentation..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_mut().(), ws.documentationrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#documentation..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 479 | maybe_inheritrust-analyzer cargo cargo_toml 0.22.3 maybe_inherit().(package.homepagerust-analyzer cargo cargo_toml 0.22.3 Package#homepage..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_mut().(), ws.homepagerust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#homepage..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 480 | maybe_inheritrust-analyzer cargo cargo_toml 0.22.3 maybe_inherit().(package.licenserust-analyzer cargo cargo_toml 0.22.3 Package#license..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_mut().(), ws.licenserust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#license..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 481 | maybe_inheritrust-analyzer cargo cargo_toml 0.22.3 maybe_inherit().(package.repositoryrust-analyzer cargo cargo_toml 0.22.3 Package#repository..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_mut().(), ws.repositoryrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#repository..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 482 | maybe_inheritrust-analyzer cargo cargo_toml 0.22.3 maybe_inherit().(package.rust_versionrust-analyzer cargo cargo_toml 0.22.3 Package#rust_version..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_mut().(), ws.rust_versionrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#rust_version..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()); |
| 483 | package.publishrust-analyzer cargo cargo_toml 0.22.3 Package#publish..inheritrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]inherit().(&ws.publishrust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#publish.); |
| 484 | match (&mut package.readmerust-analyzer cargo cargo_toml 0.22.3 Package#readme., &ws.readmerust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#readme.) { |
| 485 | (r @ Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Inheritedrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Inherited#, flag @ OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(_)) => { |
| 486 | r.setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]set().(flag.clonerust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile][Clone]clone().()); |
| 487 | }, |
| 488 | (r @ Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Inheritedrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Inherited#, OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#::Pathrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Path#(path)) => { |
| 489 | r.setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]set().(OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#::Pathrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Path#(workspace_base_path.joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().(path))); |
| 490 | }, |
| 491 | _ => {}, |
| 492 | } |
| 493 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((f, ws)) = package.license_filerust-analyzer cargo cargo_toml 0.22.3 Package#license_file..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_mut().().ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]zip().(ws.license_filerust-analyzer cargo cargo_toml 0.22.3 PackageTemplate#license_file..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()) { |
| 494 | f.setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]set().(workspace_base_path.joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().(ws)); |
| 495 | } |
| 496 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 497 | } |
| 498 | |
| 499 | fn complete_from_abstract_filesystem_innerrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]complete_from_abstract_filesystem_inner().(&mut self, fs: &dyn AbstractFilesystemrust-analyzer cargo cargo_toml 0.22.3 afs/AbstractFilesystem#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 500 | let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(package) = &self.packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package. else { return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) }; |
| 501 | |
| 502 | let src = match fs.file_names_inrust-analyzer cargo cargo_toml 0.22.3 afs/AbstractFilesystem#file_names_in().("src") { |
| 503 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(src) => src, |
| 504 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err) if err.kindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]kind().() rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().==rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq(). rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::NotFoundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#NotFound# => Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S>`][Default]default().(), |
| 505 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err) => return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()), |
| 506 | }; |
| 507 | |
| 508 | let has_path = self.librust-analyzer cargo cargo_toml 0.22.3 Manifest#lib..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().is_some_andrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some_and().(|l| l.pathrust-analyzer cargo cargo_toml 0.22.3 Product#path..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().()); |
| 509 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().has_path && (package.autolibrust-analyzer cargo cargo_toml 0.22.3 Package#autolib. || self.librust-analyzer cargo cargo_toml 0.22.3 Manifest#lib..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().()) && src.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().("lib.rs") { |
| 510 | self.librust-analyzer cargo cargo_toml 0.22.3 Manifest#lib. |
| 511 | .get_or_insert_withrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]get_or_insert_with().(Productrust-analyzer cargo cargo_toml 0.22.3 Product#::defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Product][Default]default().) |
| 512 | .pathrust-analyzer cargo cargo_toml 0.22.3 Product#path. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("src/lib.rs".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()); |
| 513 | } |
| 514 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(lib) = &mut self.librust-analyzer cargo cargo_toml 0.22.3 Manifest#lib. { |
| 515 | lib.namerust-analyzer cargo cargo_toml 0.22.3 Product#name..get_or_insert_withrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]get_or_insert_with().(|| package.namerust-analyzer cargo cargo_toml 0.22.3 Package#name..replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().('-', "_")); |
| 516 | if lib.editionrust-analyzer cargo cargo_toml 0.22.3 Product#edition..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() { |
| 517 | lib.editionrust-analyzer cargo cargo_toml 0.22.3 Product#edition. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().package.editionrust-analyzer cargo cargo_toml 0.22.3 Package#edition..getrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]get().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().); |
| 518 | } |
| 519 | if lib.crate_typerust-analyzer cargo cargo_toml 0.22.3 Product#crate_type..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]is_empty().() { |
| 520 | lib.crate_typerust-analyzer cargo cargo_toml 0.22.3 Product#crate_type..pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().("lib".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()); |
| 521 | } |
| 522 | lib.required_featuresrust-analyzer cargo cargo_toml 0.22.3 Product#required_features..clearrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]clear().(); // not applicable |
| 523 | } |
| 524 | |
| 525 | if package.autobinsrust-analyzer cargo cargo_toml 0.22.3 Package#autobins. { |
| 526 | let mut bin = takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/take().(&mut self.binrust-analyzer cargo cargo_toml 0.22.3 Manifest#bin.); |
| 527 | let (fully_overrided, mut partial_overrided) = self.autosetrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]autoset().(&mut bin, "src/bin", fs)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 528 | self.binrust-analyzer cargo cargo_toml 0.22.3 Manifest#bin. = bin; |
| 529 | |
| 530 | if src.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().("main.rs") && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().fully_overrided.containsrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`BTreeSet<T, A>`]contains().("src/main.rs") { |
| 531 | let rel_path = "src/main.rs".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 532 | let name = &package.namerust-analyzer cargo cargo_toml 0.22.3 Package#name.; |
| 533 | |
| 534 | let product = if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(mut product) = partial_overrided.removerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]remove().(name) { |
| 535 | product.pathrust-analyzer cargo cargo_toml 0.22.3 Product#path. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(rel_path); |
| 536 | product |
| 537 | } else { |
| 538 | Productrust-analyzer cargo cargo_toml 0.22.3 Product# { |
| 539 | namerust-analyzer cargo cargo_toml 0.22.3 Product#name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(name.clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][Clone]clone().()), |
| 540 | pathrust-analyzer cargo cargo_toml 0.22.3 Product#path.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(rel_path), |
| 541 | editionrust-analyzer cargo cargo_toml 0.22.3 Product#edition.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().package.editionrust-analyzer cargo cargo_toml 0.22.3 Package#edition..getrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]get().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().), |
| 542 | ..Productrust-analyzer cargo cargo_toml 0.22.3 Product#::defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Product][Default]default().() |
| 543 | } |
| 544 | }; |
| 545 | self.binrust-analyzer cargo cargo_toml 0.22.3 Manifest#bin..pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(product); |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]::sort_productsrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]sort_products().(&mut self.binrust-analyzer cargo cargo_toml 0.22.3 Manifest#bin.); |
| 550 | |
| 551 | if package.autoexamplesrust-analyzer cargo cargo_toml 0.22.3 Package#autoexamples. { |
| 552 | let mut example = takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/take().(&mut self.examplerust-analyzer cargo cargo_toml 0.22.3 Manifest#example.); |
| 553 | self.autosetrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]autoset().(&mut example, "examples", fs)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 554 | self.examplerust-analyzer cargo cargo_toml 0.22.3 Manifest#example. = example; |
| 555 | } |
| 556 | |
| 557 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]::sort_productsrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]sort_products().(&mut self.examplerust-analyzer cargo cargo_toml 0.22.3 Manifest#example.); |
| 558 | |
| 559 | if package.autotestsrust-analyzer cargo cargo_toml 0.22.3 Package#autotests. { |
| 560 | let mut test = takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/take().(&mut self.testrust-analyzer cargo cargo_toml 0.22.3 Manifest#test.); |
| 561 | self.autosetrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]autoset().(&mut test, "tests", fs)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 562 | self.testrust-analyzer cargo cargo_toml 0.22.3 Manifest#test. = test; |
| 563 | } |
| 564 | |
| 565 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]::sort_productsrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]sort_products().(&mut self.testrust-analyzer cargo cargo_toml 0.22.3 Manifest#test.); |
| 566 | |
| 567 | if package.autobenchesrust-analyzer cargo cargo_toml 0.22.3 Package#autobenches. { |
| 568 | let mut bench = takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/take().(&mut self.benchrust-analyzer cargo cargo_toml 0.22.3 Manifest#bench.); |
| 569 | self.autosetrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]autoset().(&mut bench, "benches", fs)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 570 | self.benchrust-analyzer cargo cargo_toml 0.22.3 Manifest#bench. = bench; |
| 571 | } |
| 572 | |
| 573 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]::sort_productsrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]sort_products().(&mut self.benchrust-analyzer cargo cargo_toml 0.22.3 Manifest#bench.); |
| 574 | |
| 575 | let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(package) = &mut self.packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package. else { return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) }; |
| 576 | |
| 577 | let root_files = fs.file_names_inrust-analyzer cargo cargo_toml 0.22.3 afs/AbstractFilesystem#file_names_in().("")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 578 | |
| 579 | if matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(package.buildrust-analyzer cargo cargo_toml 0.22.3 Package#build., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(true))) && root_files.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().("build.rs") { |
| 580 | package.buildrust-analyzer cargo cargo_toml 0.22.3 Package#build. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#::Pathrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Path#("build.rs".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())); |
| 581 | } |
| 582 | |
| 583 | if matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(package.readmerust-analyzer cargo cargo_toml 0.22.3 Package#readme..getrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]get().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()., OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(true)) { |
| 584 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(name) = root_files.getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]get().("README.md").or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]or_else().(|| root_files.getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]get().("README.txt")).or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]or_else().(|| root_files.getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]get().("README")) { |
| 585 | package.readmerust-analyzer cargo cargo_toml 0.22.3 Package#readme. = Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#(OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#::Pathrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Path#(PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#::fromrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[PathBuf][`From<&T>`]from().(&*rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Deref]deref().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().name))); |
| 586 | } |
| 587 | } |
| 588 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 589 | } |
| 590 | |
| 591 | /// Return the set of path overrided in `Cargo.toml`. |
| 592 | fn autosetrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]autoset().( |
| 593 | &self, |
| 594 | out: &mut Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Productrust-analyzer cargo cargo_toml 0.22.3 Product#>, |
| 595 | dir: &str, |
| 596 | fs: &dyn AbstractFilesystemrust-analyzer cargo cargo_toml 0.22.3 afs/AbstractFilesystem#, |
| 597 | ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(BTreeSetrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/BTreeSet#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Productrust-analyzer cargo cargo_toml 0.22.3 Product#>), Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 598 | let fully_overrided: BTreeSetrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/BTreeSet#<_> = out.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() |
| 599 | .filter_maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#filter_map().(|product| product.pathrust-analyzer cargo cargo_toml 0.22.3 Product#path..clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Clone]clone().()) |
| 600 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 601 | |
| 602 | let mut partial_overrided: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Productrust-analyzer cargo cargo_toml 0.22.3 Product#> = out.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() |
| 603 | .filter_maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#filter_map().(|product| { |
| 604 | match (&product.pathrust-analyzer cargo cargo_toml 0.22.3 Product#path., &product.namerust-analyzer cargo cargo_toml 0.22.3 Product#name.) { |
| 605 | (Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(name)) => { |
| 606 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((name.clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][Clone]clone().(), product.clonerust-analyzer cargo cargo_toml 0.22.3 impl#[Product][Clone]clone().())) |
| 607 | }, |
| 608 | _ => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# |
| 609 | } |
| 610 | }) |
| 611 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 612 | |
| 613 | // Remove partially overrided items |
| 614 | out.retainrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]retain().(|product| product.pathrust-analyzer cargo cargo_toml 0.22.3 Product#path..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().()); |
| 615 | |
| 616 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(package) = &self.packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package. { |
| 617 | if let Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(bins) = fs.file_names_inrust-analyzer cargo cargo_toml 0.22.3 afs/AbstractFilesystem#file_names_in().(dir) { |
| 618 | for name in bins { |
| 619 | let rel_path = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{dir}/{name}"); |
| 620 | |
| 621 | if name.ends_withrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]ends_with().(".rs") { |
| 622 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().fully_overrided.containsrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`BTreeSet<T, A>`]contains().(&rel_path) { |
| 623 | let name = name.trim_end_matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]trim_end_matches().(".rs"); |
| 624 | |
| 625 | let product = if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(mut product) = partial_overrided.removerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]remove().(name) { |
| 626 | product.pathrust-analyzer cargo cargo_toml 0.22.3 Product#path. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(rel_path); |
| 627 | product |
| 628 | } else { |
| 629 | Productrust-analyzer cargo cargo_toml 0.22.3 Product# { |
| 630 | namerust-analyzer cargo cargo_toml 0.22.3 Product#name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(name.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()), |
| 631 | pathrust-analyzer cargo cargo_toml 0.22.3 Product#path.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(rel_path), |
| 632 | editionrust-analyzer cargo cargo_toml 0.22.3 Product#edition.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().package.editionrust-analyzer cargo cargo_toml 0.22.3 Package#edition..getrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]get().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().), |
| 633 | ..Productrust-analyzer cargo cargo_toml 0.22.3 Product#::defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Product][Default]default().() |
| 634 | } |
| 635 | }; |
| 636 | out.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(product); |
| 637 | } |
| 638 | } else if let Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(sub) = fs.file_names_inrust-analyzer cargo cargo_toml 0.22.3 afs/AbstractFilesystem#file_names_in().(&rel_path) { |
| 639 | let rel_path = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{rel_path}/main.rs"); |
| 640 | |
| 641 | if sub.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().("main.rs") && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().fully_overrided.containsrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`BTreeSet<T, A>`]contains().(&rel_path) { |
| 642 | let product = if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(mut product) = partial_overrided.removerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]remove().(&*rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Deref]deref().name) { |
| 643 | product.pathrust-analyzer cargo cargo_toml 0.22.3 Product#path. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(rel_path); |
| 644 | product |
| 645 | } else { |
| 646 | Productrust-analyzer cargo cargo_toml 0.22.3 Product# { |
| 647 | namerust-analyzer cargo cargo_toml 0.22.3 Product#name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(name.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()), |
| 648 | pathrust-analyzer cargo cargo_toml 0.22.3 Product#path.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(rel_path), |
| 649 | editionrust-analyzer cargo cargo_toml 0.22.3 Product#edition.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().package.editionrust-analyzer cargo cargo_toml 0.22.3 Package#edition..getrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]get().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().), |
| 650 | ..Productrust-analyzer cargo cargo_toml 0.22.3 Product#::defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Product][Default]default().() |
| 651 | } |
| 652 | }; |
| 653 | out.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(product); |
| 654 | } |
| 655 | } |
| 656 | } |
| 657 | } |
| 658 | } |
| 659 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((fully_overrided, partial_overrided)) |
| 660 | } |
| 661 | |
| 662 | /// ensure bins are deterministic |
| 663 | fn sort_productsrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]sort_products().(products: &mut [Productrust-analyzer cargo cargo_toml 0.22.3 Product#]) { |
| 664 | products.sort_unstable_byrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]sort_unstable_by().(|a, b| a.namerust-analyzer cargo cargo_toml 0.22.3 Product#name..cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Ord]cmp().(&b.namerust-analyzer cargo cargo_toml 0.22.3 Product#name.).thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impl#[Ordering]then().(a.pathrust-analyzer cargo cargo_toml 0.22.3 Product#path..cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Ord]cmp().(&b.pathrust-analyzer cargo cargo_toml 0.22.3 Product#path.))); |
| 665 | } |
| 666 | |
| 667 | /// Panics if it's not a package (only a workspace). |
| 668 | /// |
| 669 | /// You can access the `.package` field directly to handle the `Option`: |
| 670 | /// |
| 671 | /// ```rust,ignore |
| 672 | /// manifest.package.as_ref().ok_or(SomeError::NotAPackage)?; |
| 673 | /// ``` |
| 674 | #[track_caller] |
| 675 | #[inline] |
| 676 | pub fn packagerust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]package().(&self) -> &Packagerust-analyzer cargo cargo_toml 0.22.3 Package#<Metadata> { |
| 677 | self.packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("not a package") |
| 678 | } |
| 679 | |
| 680 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 681 | pub fn lintsrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`]lints().(&self) -> &LintGroupsrust-analyzer cargo cargo_toml 0.22.3 LintGroups# { |
| 682 | self.lintsrust-analyzer cargo cargo_toml 0.22.3 Manifest#lints..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 683 | } |
| 684 | } |
| 685 | |
| 686 | fn inherit_dependenciesrust-analyzer cargo cargo_toml 0.22.3 inherit_dependencies().<Ignored>(deps_to_inherit: &mut BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Dependencyrust-analyzer cargo cargo_toml 0.22.3 Dependency#>, workspace: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&Workspacerust-analyzer cargo cargo_toml 0.22.3 Workspace#<Ignored>>, workspace_base_path: &Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 687 | for (key, dep) in deps_to_inherit { |
| 688 | if let Dependencyrust-analyzer cargo cargo_toml 0.22.3 Dependency#::Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(overrides) = dep { |
| 689 | let template = workspace.and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]and_then().(|ws| ws.dependenciesrust-analyzer cargo cargo_toml 0.22.3 Workspace#dependencies..getrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]get().(key)) |
| 690 | .ok_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]ok_or_else().(|| Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::WorkspaceIntegrityrust-analyzer cargo cargo_toml 0.22.3 error/Error#WorkspaceIntegrity#(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("workspace dependencies are missing `{key}`")))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 691 | let mut overrides = overrides.clonerust-analyzer cargo cargo_toml 0.22.3 impl#[InheritedDependencyDetail][Clone]clone().(); |
| 692 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dep = template.clonerust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency][Clone]clone().(); |
| 693 | if overrides.optionalrust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail#optional. { |
| 694 | dep.try_detail_mutrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]try_detail_mut().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..optionalrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#optional. = true; |
| 695 | } |
| 696 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().overrides.featuresrust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail#features..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]is_empty().() { |
| 697 | dep.try_detail_mutrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]try_detail_mut().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..featuresrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#features..appendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]append().(&mut overrides.featuresrust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail#features.); |
| 698 | } |
| 699 | if let Dependencyrust-analyzer cargo cargo_toml 0.22.3 Dependency#::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(dep) = dep { |
| 700 | dep.inheritedrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#inherited. = true; |
| 701 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(path) = &mut dep.pathrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#path. { |
| 702 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().path = workspace_base_path.joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().(&path).displayrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]display().().to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 703 | } |
| 704 | } |
| 705 | } |
| 706 | } |
| 707 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 708 | } |
| 709 | |
| 710 | impl<Metadata: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#> Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for Manifestrust-analyzer cargo cargo_toml 0.22.3 Manifest#<Metadata> { |
| 711 | #[allow(deprecated)] |
| 712 | fn defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`][Default]default().() -> Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`][Default] { |
| 713 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Manifest<Metadata>`][Default] { |
| 714 | packagerust-analyzer cargo cargo_toml 0.22.3 Manifest#package.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 715 | workspacerust-analyzer cargo cargo_toml 0.22.3 Manifest#workspace.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 716 | dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#dependencies.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`][Default]default().(), |
| 717 | dev_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#dev_dependencies.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`][Default]default().(), |
| 718 | build_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Manifest#build_dependencies.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`][Default]default().(), |
| 719 | targetrust-analyzer cargo cargo_toml 0.22.3 Manifest#target.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`][Default]default().(), |
| 720 | featuresrust-analyzer cargo cargo_toml 0.22.3 Manifest#features.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`][Default]default().(), |
| 721 | replacerust-analyzer cargo cargo_toml 0.22.3 Manifest#replace.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`][Default]default().(), |
| 722 | patchrust-analyzer cargo cargo_toml 0.22.3 Manifest#patch.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`][Default]default().(), |
| 723 | librust-analyzer cargo cargo_toml 0.22.3 Manifest#lib.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 724 | profilerust-analyzer cargo cargo_toml 0.22.3 Manifest#profile.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Profiles][Default]default().(), |
| 725 | badgesrust-analyzer cargo cargo_toml 0.22.3 Manifest#badges.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Badges][Default]default().(), |
| 726 | binrust-analyzer cargo cargo_toml 0.22.3 Manifest#bin.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`][Default]default().(), |
| 727 | benchrust-analyzer cargo cargo_toml 0.22.3 Manifest#bench.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`][Default]default().(), |
| 728 | testrust-analyzer cargo cargo_toml 0.22.3 Manifest#test.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`][Default]default().(), |
| 729 | examplerust-analyzer cargo cargo_toml 0.22.3 Manifest#example.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`][Default]default().(), |
| 730 | lintsrust-analyzer cargo cargo_toml 0.22.3 Manifest#lints.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`][Default]default().(), |
| 731 | } |
| 732 | } |
| 733 | } |
| 734 | |
| 735 | /// Build-in an custom build/optimization settings |
| 736 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 737 | pub struct Profilesrust-analyzer cargo cargo_toml 0.22.3 Profiles# { |
| 738 | /// Used for `--release` |
| 739 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 740 | pub releaserust-analyzer cargo cargo_toml 0.22.3 Profiles#release.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Profilerust-analyzer cargo cargo_toml 0.22.3 Profile#>, |
| 741 | |
| 742 | /// Used by default, weirdly called `debug` profile. |
| 743 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 744 | pub devrust-analyzer cargo cargo_toml 0.22.3 Profiles#dev.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Profilerust-analyzer cargo cargo_toml 0.22.3 Profile#>, |
| 745 | |
| 746 | /// Used for `cargo test` |
| 747 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 748 | pub testrust-analyzer cargo cargo_toml 0.22.3 Profiles#test.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Profilerust-analyzer cargo cargo_toml 0.22.3 Profile#>, |
| 749 | |
| 750 | /// Used for `cargo bench` (nightly) |
| 751 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 752 | pub benchrust-analyzer cargo cargo_toml 0.22.3 Profiles#bench.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Profilerust-analyzer cargo cargo_toml 0.22.3 Profile#>, |
| 753 | |
| 754 | /// Unused |
| 755 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 756 | #[deprecated(note = "the `doc` profile is obsolete. `cargo doc` uses the `dev` profile")] |
| 757 | pub docrust-analyzer cargo cargo_toml 0.22.3 Profiles#doc.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Profilerust-analyzer cargo cargo_toml 0.22.3 Profile#>, |
| 758 | |
| 759 | /// User-suppiled for `cargo --profile=name` |
| 760 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(flatten)] |
| 761 | pub customrust-analyzer cargo cargo_toml 0.22.3 Profiles#custom.: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Profilerust-analyzer cargo cargo_toml 0.22.3 Profile#>, |
| 762 | } |
| 763 | |
| 764 | impl Profilesrust-analyzer cargo cargo_toml 0.22.3 Profiles# { |
| 765 | /// Determine whether or not a Profiles struct should be serialized |
| 766 | fn should_skip_serializingrust-analyzer cargo cargo_toml 0.22.3 impl#[Profiles]should_skip_serializing().(&self) -> bool { |
| 767 | self.releaserust-analyzer cargo cargo_toml 0.22.3 Profiles#release..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() |
| 768 | && self.devrust-analyzer cargo cargo_toml 0.22.3 Profiles#dev..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() |
| 769 | && self.testrust-analyzer cargo cargo_toml 0.22.3 Profiles#test..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() |
| 770 | && self.benchrust-analyzer cargo cargo_toml 0.22.3 Profiles#bench..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() |
| 771 | && self.customrust-analyzer cargo cargo_toml 0.22.3 Profiles#custom..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]is_empty().() |
| 772 | } |
| 773 | } |
| 774 | |
| 775 | /// Verbosity of debug info in a [`Profile`] |
| 776 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialOrdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd:, Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 777 | #[serde(try_from = "toml::Value")] |
| 778 | pub enum DebugSettingrust-analyzer cargo cargo_toml 0.22.3 DebugSetting# { |
| 779 | /// 0 or false |
| 780 | Nonerust-analyzer cargo cargo_toml 0.22.3 DebugSetting#None# = 0, |
| 781 | /// 1 = line tables only |
| 782 | Linesrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#Lines# = 1, |
| 783 | /// 2 or true |
| 784 | Fullrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#Full# = 2, |
| 785 | } |
| 786 | |
| 787 | impl TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#> for DebugSettingrust-analyzer cargo cargo_toml 0.22.3 DebugSetting# { |
| 788 | type Errorrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]Error# = Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#; |
| 789 | |
| 790 | fn try_fromrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]try_from().(v: Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`], Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 791 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(match v { |
| 792 | Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#::Booleanrust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#Boolean#(b) => if b { Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]::Fullrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#Full# } else { Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]::Nonerust-analyzer cargo cargo_toml 0.22.3 DebugSetting#None# }, |
| 793 | Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#::Integerrust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#Integer#(n) => match n { |
| 794 | 0 => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]::Nonerust-analyzer cargo cargo_toml 0.22.3 DebugSetting#None#, |
| 795 | 1 => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]::Linesrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#Lines#, |
| 796 | 2 => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]::Fullrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#Full#, |
| 797 | _ => return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("wrong number for debug setting")), |
| 798 | }, |
| 799 | Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#::Stringrust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#String#(s) => match s.as_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_str().() { |
| 800 | "none" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]::Nonerust-analyzer cargo cargo_toml 0.22.3 DebugSetting#None#, |
| 801 | "limited" | "line-directives-only" | "line-tables-only" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]::Linesrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#Lines#, |
| 802 | "full" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][`TryFrom<Value>`]::Fullrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#Full#, |
| 803 | _ => return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("wrong name for debug setting")), |
| 804 | }, |
| 805 | _ => return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("wrong data type for debug setting")), |
| 806 | }) |
| 807 | } |
| 808 | } |
| 809 | |
| 810 | impl Serializerust-analyzer cargo serde_core 1.0.229 ser/Serialize# for DebugSettingrust-analyzer cargo cargo_toml 0.22.3 DebugSetting# { |
| 811 | fn serializerust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][Serialize]serialize().<S: Serializerrust-analyzer cargo serde_core 1.0.229 ser/Serializer#>(&self, serializer: S) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<S::Okrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Ok#, S::Errorrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Error#> { |
| 812 | match self { |
| 813 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][Serialize]::Nonerust-analyzer cargo cargo_toml 0.22.3 DebugSetting#None# => serializer.serialize_boolrust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_bool().(false), |
| 814 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][Serialize]::Linesrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#Lines# => serializer.serialize_i8rust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_i8().(1), |
| 815 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DebugSetting][Serialize]::Fullrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#Full# => serializer.serialize_boolrust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_bool().(true), |
| 816 | } |
| 817 | } |
| 818 | } |
| 819 | |
| 820 | /// Handling of debug symbols in a build profile |
| 821 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialOrdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd:, Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 822 | #[serde(try_from = "toml::Value")] |
| 823 | pub enum StripSettingrust-analyzer cargo cargo_toml 0.22.3 StripSetting# { |
| 824 | /// Same as `strip = false` |
| 825 | Nonerust-analyzer cargo cargo_toml 0.22.3 StripSetting#None#, |
| 826 | /// Detailed debug is stripped, but coarse debug is preserved |
| 827 | Debuginforust-analyzer cargo cargo_toml 0.22.3 StripSetting#Debuginfo#, |
| 828 | /// Stronger than the `Debuginfo` setting, same as `strip = true` |
| 829 | Symbolsrust-analyzer cargo cargo_toml 0.22.3 StripSetting#Symbols#, |
| 830 | } |
| 831 | |
| 832 | impl Serializerust-analyzer cargo serde_core 1.0.229 ser/Serialize# for StripSettingrust-analyzer cargo cargo_toml 0.22.3 StripSetting# { |
| 833 | fn serializerust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][Serialize]serialize().<S: Serializerrust-analyzer cargo serde_core 1.0.229 ser/Serializer#>(&self, serializer: S) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<S::Okrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Ok#, S::Errorrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Error#> { |
| 834 | match self { |
| 835 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][Serialize]::Nonerust-analyzer cargo cargo_toml 0.22.3 StripSetting#None# => serializer.serialize_boolrust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_bool().(false), |
| 836 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][Serialize]::Debuginforust-analyzer cargo cargo_toml 0.22.3 StripSetting#Debuginfo# => serializer.serialize_strrust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_str().("debuginfo"), |
| 837 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][Serialize]::Symbolsrust-analyzer cargo cargo_toml 0.22.3 StripSetting#Symbols# => serializer.serialize_boolrust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_bool().(true), |
| 838 | } |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | impl TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#> for StripSettingrust-analyzer cargo cargo_toml 0.22.3 StripSetting# { |
| 843 | type Errorrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][`TryFrom<Value>`]Error# = Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#; |
| 844 | |
| 845 | fn try_fromrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][`TryFrom<Value>`]try_from().(v: Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][`TryFrom<Value>`], Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 846 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(match v { |
| 847 | Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#::Booleanrust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#Boolean#(b) => if b { Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][`TryFrom<Value>`]::Symbolsrust-analyzer cargo cargo_toml 0.22.3 StripSetting#Symbols# } else { Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][`TryFrom<Value>`]::Nonerust-analyzer cargo cargo_toml 0.22.3 StripSetting#None# }, |
| 848 | Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#::Stringrust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#String#(s) => match s.as_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_str().() { |
| 849 | "none" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][`TryFrom<Value>`]::Nonerust-analyzer cargo cargo_toml 0.22.3 StripSetting#None#, |
| 850 | "debuginfo" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][`TryFrom<Value>`]::Debuginforust-analyzer cargo cargo_toml 0.22.3 StripSetting#Debuginfo#, |
| 851 | "symbols" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[StripSetting][`TryFrom<Value>`]::Symbolsrust-analyzer cargo cargo_toml 0.22.3 StripSetting#Symbols#, |
| 852 | _ => return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("strip setting has unknown string value")), |
| 853 | }, |
| 854 | _ => return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("wrong data type for strip setting")), |
| 855 | }) |
| 856 | } |
| 857 | } |
| 858 | |
| 859 | /// Handling of LTO in a build profile |
| 860 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialOrdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd:, Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 861 | #[serde(try_from = "toml::Value")] |
| 862 | pub enum LtoSettingrust-analyzer cargo cargo_toml 0.22.3 LtoSetting# { |
| 863 | /// off |
| 864 | Nonerust-analyzer cargo cargo_toml 0.22.3 LtoSetting#None#, |
| 865 | /// false |
| 866 | ThinLocalrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#ThinLocal#, |
| 867 | Thinrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#Thin#, |
| 868 | /// True |
| 869 | Fatrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#Fat#, |
| 870 | } |
| 871 | |
| 872 | impl Serializerust-analyzer cargo serde_core 1.0.229 ser/Serialize# for LtoSettingrust-analyzer cargo cargo_toml 0.22.3 LtoSetting# { |
| 873 | fn serializerust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][Serialize]serialize().<S: Serializerrust-analyzer cargo serde_core 1.0.229 ser/Serializer#>(&self, serializer: S) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<S::Okrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Ok#, S::Errorrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Error#> { |
| 874 | match self { |
| 875 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][Serialize]::Nonerust-analyzer cargo cargo_toml 0.22.3 LtoSetting#None# => serializer.serialize_strrust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_str().("off"), |
| 876 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][Serialize]::ThinLocalrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#ThinLocal# => serializer.serialize_boolrust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_bool().(false), |
| 877 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][Serialize]::Thinrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#Thin# => serializer.serialize_strrust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_str().("thin"), |
| 878 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][Serialize]::Fatrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#Fat# => serializer.serialize_boolrust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_bool().(true), |
| 879 | } |
| 880 | } |
| 881 | } |
| 882 | |
| 883 | impl TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#> for LtoSettingrust-analyzer cargo cargo_toml 0.22.3 LtoSetting# { |
| 884 | type Errorrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][`TryFrom<Value>`]Error# = Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#; |
| 885 | |
| 886 | fn try_fromrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][`TryFrom<Value>`]try_from().(v: Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][`TryFrom<Value>`], Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 887 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(match v { |
| 888 | Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#::Booleanrust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#Boolean#(b) => if b { Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][`TryFrom<Value>`]::Fatrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#Fat# } else { Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][`TryFrom<Value>`]::ThinLocalrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#ThinLocal# }, |
| 889 | Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#::Stringrust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#String#(s) => match s.as_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_str().() { |
| 890 | "off" | "n" | "no" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][`TryFrom<Value>`]::Nonerust-analyzer cargo cargo_toml 0.22.3 LtoSetting#None#, |
| 891 | "thin" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][`TryFrom<Value>`]::Thinrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#Thin#, |
| 892 | "fat" | "on" | "y" | "yes" | "true" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][`TryFrom<Value>`]::Fatrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#Fat#, |
| 893 | "false" => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LtoSetting][`TryFrom<Value>`]::ThinLocalrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#ThinLocal#, |
| 894 | _ => return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("lto setting has unknown string value")), |
| 895 | }, |
| 896 | _ => return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::Otherrust-analyzer cargo cargo_toml 0.22.3 error/Error#Other#("wrong data type for lto setting")), |
| 897 | }) |
| 898 | } |
| 899 | } |
| 900 | |
| 901 | /// Compilation/optimization settings for a workspace |
| 902 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 903 | #[serde(rename_all = "kebab-case")] |
| 904 | pub struct Profilerust-analyzer cargo cargo_toml 0.22.3 Profile# { |
| 905 | /// num or z, s |
| 906 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 907 | pub opt_levelrust-analyzer cargo cargo_toml 0.22.3 Profile#opt_level.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#>, |
| 908 | |
| 909 | /// 0,1,2 or bool |
| 910 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 911 | pub debugrust-analyzer cargo cargo_toml 0.22.3 Profile#debug.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<DebugSettingrust-analyzer cargo cargo_toml 0.22.3 DebugSetting#>, |
| 912 | |
| 913 | /// Move debug info to separate files |
| 914 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 915 | pub split_debuginforust-analyzer cargo cargo_toml 0.22.3 Profile#split_debuginfo.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 916 | |
| 917 | /// For dynamic libraries |
| 918 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 919 | pub rpathrust-analyzer cargo cargo_toml 0.22.3 Profile#rpath.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>, |
| 920 | |
| 921 | /// Link-time-optimization |
| 922 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 923 | pub ltorust-analyzer cargo cargo_toml 0.22.3 Profile#lto.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<LtoSettingrust-analyzer cargo cargo_toml 0.22.3 LtoSetting#>, |
| 924 | |
| 925 | /// Extra assertions |
| 926 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 927 | pub debug_assertionsrust-analyzer cargo cargo_toml 0.22.3 Profile#debug_assertions.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>, |
| 928 | |
| 929 | /// Parallel compilation |
| 930 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 931 | pub codegen_unitsrust-analyzer cargo cargo_toml 0.22.3 Profile#codegen_units.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u16>, |
| 932 | |
| 933 | /// Handling of panics/unwinding |
| 934 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 935 | pub panicrust-analyzer cargo cargo_toml 0.22.3 Profile#panic.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 936 | |
| 937 | /// Support for incremental rebuilds |
| 938 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 939 | pub incrementalrust-analyzer cargo cargo_toml 0.22.3 Profile#incremental.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>, |
| 940 | |
| 941 | /// Check integer arithmetic |
| 942 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 943 | pub overflow_checksrust-analyzer cargo cargo_toml 0.22.3 Profile#overflow_checks.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>, |
| 944 | |
| 945 | /// Remove debug info |
| 946 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 947 | pub striprust-analyzer cargo cargo_toml 0.22.3 Profile#strip.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<StripSettingrust-analyzer cargo cargo_toml 0.22.3 StripSetting#>, |
| 948 | |
| 949 | /// Profile overrides for dependencies, `*` is special. |
| 950 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "BTreeMap::is_empty")] |
| 951 | pub packagerust-analyzer cargo cargo_toml 0.22.3 Profile#package.: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#>, |
| 952 | |
| 953 | /// Profile overrides for build dependencies, `*` is special. |
| 954 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 955 | pub build_overriderust-analyzer cargo cargo_toml 0.22.3 Profile#build_override.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#>, |
| 956 | |
| 957 | /// Only relevant for non-standard profiles |
| 958 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 959 | pub inheritsrust-analyzer cargo cargo_toml 0.22.3 Profile#inherits.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 960 | } |
| 961 | |
| 962 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 963 | #[serde(rename_all = "kebab-case")] |
| 964 | /// Cargo uses the term "target" for both "target platform" and "build target" (the thing to build), |
| 965 | /// which makes it ambigous. |
| 966 | /// Here Cargo's bin/lib **target** is renamed to **product**. |
| 967 | pub struct Productrust-analyzer cargo cargo_toml 0.22.3 Product# { |
| 968 | /// This field points at where the crate is located, relative to the `Cargo.toml`. |
| 969 | pub pathrust-analyzer cargo cargo_toml 0.22.3 Product#path.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 970 | |
| 971 | /// The name of a product is the name of the library or binary that will be generated. |
| 972 | /// This is defaulted to the name of the package, with any dashes replaced |
| 973 | /// with underscores. (Rust `extern crate` declarations reference this name; |
| 974 | /// therefore the value must be a valid Rust identifier to be usable.) |
| 975 | pub namerust-analyzer cargo cargo_toml 0.22.3 Product#name.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 976 | |
| 977 | /// A flag for enabling unit tests for this product. This is used by `cargo test`. |
| 978 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 979 | pub testrust-analyzer cargo cargo_toml 0.22.3 Product#test.: bool, |
| 980 | |
| 981 | /// A flag for enabling documentation tests for this product. This is only relevant |
| 982 | /// for libraries, it has no effect on other sections. This is used by |
| 983 | /// `cargo test`. |
| 984 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 985 | pub doctestrust-analyzer cargo cargo_toml 0.22.3 Product#doctest.: bool, |
| 986 | |
| 987 | /// A flag for enabling benchmarks for this product. This is used by `cargo bench`. |
| 988 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 989 | pub benchrust-analyzer cargo cargo_toml 0.22.3 Product#bench.: bool, |
| 990 | |
| 991 | /// A flag for enabling documentation of this product. This is used by `cargo doc`. |
| 992 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 993 | pub docrust-analyzer cargo cargo_toml 0.22.3 Product#doc.: bool, |
| 994 | |
| 995 | /// If the product is meant to be a compiler plugin, this field must be set to true |
| 996 | /// for Cargo to correctly compile it and make it available for all dependencies. |
| 997 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "is_false")] |
| 998 | pub pluginrust-analyzer cargo cargo_toml 0.22.3 Product#plugin.: bool, |
| 999 | |
| 1000 | /// If the product is meant to be a "macros 1.1" procedural macro, this field must |
| 1001 | /// be set to true. |
| 1002 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, alias = "proc_macro", alias = "proc-macro", skip_serializing_if = "is_false")] |
| 1003 | pub proc_macrorust-analyzer cargo cargo_toml 0.22.3 Product#proc_macro.: bool, |
| 1004 | |
| 1005 | /// If set to false, `cargo test` will omit the `--test` flag to rustc, which |
| 1006 | /// stops it from generating a test harness. This is useful when the binary being |
| 1007 | /// built manages the test runner itself. |
| 1008 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 1009 | pub harnessrust-analyzer cargo cargo_toml 0.22.3 Product#harness.: bool, |
| 1010 | |
| 1011 | /// Deprecated. Edition should be set only per package. |
| 1012 | /// |
| 1013 | /// If set then a product can be configured to use a different edition than the |
| 1014 | /// `[package]` is configured to use, perhaps only compiling a library with the |
| 1015 | /// 2018 edition or only compiling one unit test with the 2015 edition. By default |
| 1016 | /// all products are compiled with the edition specified in `[package]`. |
| 1017 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1018 | pub editionrust-analyzer cargo cargo_toml 0.22.3 Product#edition.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Editionrust-analyzer cargo cargo_toml 0.22.3 Edition#>, |
| 1019 | |
| 1020 | /// The available options are "dylib", "rlib", "staticlib", "cdylib", and "proc-macro". |
| 1021 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 1022 | pub crate_typerust-analyzer cargo cargo_toml 0.22.3 Product#crate_type.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1023 | |
| 1024 | /// The `required-features` field specifies which features the product needs in order to be built. |
| 1025 | /// If any of the required features are not selected, the product will be skipped. |
| 1026 | /// This is only relevant for the `[[bin]]`, `[[bench]]`, `[[test]]`, and `[[example]]` sections, |
| 1027 | /// it has no effect on `[lib]`. |
| 1028 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default)] |
| 1029 | pub required_featuresrust-analyzer cargo cargo_toml 0.22.3 Product#required_features.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1030 | } |
| 1031 | |
| 1032 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for Productrust-analyzer cargo cargo_toml 0.22.3 Product# { |
| 1033 | fn defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Product][Default]default().() -> Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Product][Default] { |
| 1034 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Product][Default] { |
| 1035 | pathrust-analyzer cargo cargo_toml 0.22.3 Product#path.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1036 | namerust-analyzer cargo cargo_toml 0.22.3 Product#name.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1037 | testrust-analyzer cargo cargo_toml 0.22.3 Product#test.: true, |
| 1038 | doctestrust-analyzer cargo cargo_toml 0.22.3 Product#doctest.: true, |
| 1039 | benchrust-analyzer cargo cargo_toml 0.22.3 Product#bench.: true, |
| 1040 | docrust-analyzer cargo cargo_toml 0.22.3 Product#doc.: true, |
| 1041 | harnessrust-analyzer cargo cargo_toml 0.22.3 Product#harness.: true, |
| 1042 | pluginrust-analyzer cargo cargo_toml 0.22.3 Product#plugin.: false, |
| 1043 | proc_macrorust-analyzer cargo cargo_toml 0.22.3 Product#proc_macro.: false, |
| 1044 | required_featuresrust-analyzer cargo cargo_toml 0.22.3 Product#required_features.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(), |
| 1045 | crate_typerust-analyzer cargo cargo_toml 0.22.3 Product#crate_type.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(), |
| 1046 | editionrust-analyzer cargo cargo_toml 0.22.3 Product#edition.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1047 | } |
| 1048 | } |
| 1049 | } |
| 1050 | |
| 1051 | /// Dependencies that are platform-specific or enabled through custom `cfg()`. |
| 1052 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1053 | #[serde(rename_all = "kebab-case")] |
| 1054 | pub struct Targetrust-analyzer cargo cargo_toml 0.22.3 Target# { |
| 1055 | /// platform-specific normal deps |
| 1056 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default)] |
| 1057 | pub dependenciesrust-analyzer cargo cargo_toml 0.22.3 Target#dependencies.: DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet#, |
| 1058 | /// platform-specific dev-only/test-only deps |
| 1059 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default)] |
| 1060 | pub dev_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Target#dev_dependencies.: DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet#, |
| 1061 | /// platform-specific build-time deps |
| 1062 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default)] |
| 1063 | pub build_dependenciesrust-analyzer cargo cargo_toml 0.22.3 Target#build_dependencies.: DepsSetrust-analyzer cargo cargo_toml 0.22.3 DepsSet#, |
| 1064 | } |
| 1065 | |
| 1066 | /// Dependency definition. Note that this struct doesn't carry it's key/name, which you need to read from its section. |
| 1067 | /// |
| 1068 | /// It can be simple version number, or detailed settings, or inherited. |
| 1069 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1070 | #[serde(untagged)] |
| 1071 | pub enum Dependencyrust-analyzer cargo cargo_toml 0.22.3 Dependency# { |
| 1072 | /// Version requirement (e.g. `^1.5`) |
| 1073 | Simplerust-analyzer cargo cargo_toml 0.22.3 Dependency#Simple#(Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#), |
| 1074 | /// Incomplete data |
| 1075 | Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(InheritedDependencyDetailrust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail#), // order is important for serde |
| 1076 | /// `{ version = "^1.5", features = ["a", "b"] }` etc. |
| 1077 | Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<DependencyDetailrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#>), |
| 1078 | } |
| 1079 | |
| 1080 | impl Dependencyrust-analyzer cargo cargo_toml 0.22.3 Dependency# { |
| 1081 | /// Get object with special dependency settings if it's not just a version number. |
| 1082 | /// |
| 1083 | /// Returns `None` if it's inherited and the value is not available |
| 1084 | #[inline] |
| 1085 | #[must_use] |
| 1086 | pub fn detailrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]detail().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&DependencyDetailrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#> { |
| 1087 | match self { |
| 1088 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(d) => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(d), |
| 1089 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Simplerust-analyzer cargo cargo_toml 0.22.3 Dependency#Simple#(_) | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(_) => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1090 | } |
| 1091 | } |
| 1092 | |
| 1093 | /// Panics if inherited value is not available |
| 1094 | #[inline] |
| 1095 | #[track_caller] |
| 1096 | pub fn detail_mutrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]detail_mut().(&mut self) -> &mut DependencyDetailrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail# { |
| 1097 | self.try_detail_mutrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]try_detail_mut().().expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("dependency not available due to workspace inheritance") |
| 1098 | } |
| 1099 | |
| 1100 | /// Returns error if inherited value is not available |
| 1101 | /// |
| 1102 | /// Makes it detailed otherwise |
| 1103 | pub fn try_detail_mutrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]try_detail_mut().(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<&mut DependencyDetailrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#, Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 1104 | match self { |
| 1105 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(d) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(d), |
| 1106 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Simplerust-analyzer cargo cargo_toml 0.22.3 Dependency#Simple#(ver) => { |
| 1107 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(DependencyDetailrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail# { |
| 1108 | versionrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#version.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ver.clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][Clone]clone().()), |
| 1109 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[DependencyDetail][Default]default().() |
| 1110 | })); |
| 1111 | match self { |
| 1112 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(d) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(d), |
| 1113 | _ => unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!(), |
| 1114 | } |
| 1115 | }, |
| 1116 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(_) => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::InheritedUnknownValuerust-analyzer cargo cargo_toml 0.22.3 error/Error#InheritedUnknownValue#), |
| 1117 | } |
| 1118 | } |
| 1119 | |
| 1120 | /// Panics if inherited value is not available |
| 1121 | /// |
| 1122 | /// Version requirement |
| 1123 | #[inline] |
| 1124 | #[track_caller] |
| 1125 | #[must_use] |
| 1126 | pub fn reqrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]req().(&self) -> &str { |
| 1127 | self.try_reqrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]try_req().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 1128 | } |
| 1129 | |
| 1130 | /// Version requirement |
| 1131 | /// |
| 1132 | /// Returns Error if inherited value is not available |
| 1133 | #[inline] |
| 1134 | #[track_caller] |
| 1135 | pub fn try_reqrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]try_req().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<&str, Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#> { |
| 1136 | match self { |
| 1137 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Simplerust-analyzer cargo cargo_toml 0.22.3 Dependency#Simple#(v) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(v), |
| 1138 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(d) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(d.versionrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#version..as_derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_deref().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("*")), |
| 1139 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(_) => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo cargo_toml 0.22.3 error/Error#::InheritedUnknownValuerust-analyzer cargo cargo_toml 0.22.3 error/Error#InheritedUnknownValue#), |
| 1140 | } |
| 1141 | } |
| 1142 | |
| 1143 | /// Enable extra features for this dep, in addition to the `default` features controlled via `default_features`. |
| 1144 | #[inline] |
| 1145 | #[must_use] |
| 1146 | pub fn req_featuresrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]req_features().(&self) -> &[Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#] { |
| 1147 | match self { |
| 1148 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Simplerust-analyzer cargo cargo_toml 0.22.3 Dependency#Simple#(_) => &[], |
| 1149 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(d) => &d.featuresrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#features., |
| 1150 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(d) => &d.featuresrust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail#features., |
| 1151 | } |
| 1152 | } |
| 1153 | |
| 1154 | /// Is it optional. Note that optional deps can be used as features, unless features use `dep:`/`?` syntax for them. |
| 1155 | /// See the [`features`] module for more info. |
| 1156 | #[inline] |
| 1157 | #[must_use] |
| 1158 | pub fn optionalrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]optional().(&self) -> bool { |
| 1159 | match self { |
| 1160 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Simplerust-analyzer cargo cargo_toml 0.22.3 Dependency#Simple#(_) => false, |
| 1161 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(d) => d.optionalrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#optional., |
| 1162 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(d) => d.optionalrust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail#optional., |
| 1163 | } |
| 1164 | } |
| 1165 | |
| 1166 | /// `Some` if it overrides the package name. |
| 1167 | /// If `None`, use the dependency name as the package name. |
| 1168 | #[inline] |
| 1169 | #[must_use] |
| 1170 | pub fn packagerust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]package().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1171 | match self { |
| 1172 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(d) => d.packagerust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#package..as_derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_deref().(), |
| 1173 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Simplerust-analyzer cargo cargo_toml 0.22.3 Dependency#Simple#(_) | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(_) => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1174 | } |
| 1175 | } |
| 1176 | |
| 1177 | /// Git URL of this dependency, if any |
| 1178 | #[inline] |
| 1179 | #[must_use] |
| 1180 | pub fn gitrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]git().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1181 | self.detailrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]detail().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..gitrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#git..as_derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_deref().() |
| 1182 | } |
| 1183 | |
| 1184 | /// Git commit of this dependency, if any |
| 1185 | #[inline] |
| 1186 | #[must_use] |
| 1187 | pub fn git_revrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]git_rev().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1188 | self.detailrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]detail().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..revrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#rev..as_derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_deref().() |
| 1189 | } |
| 1190 | |
| 1191 | /// `true` if it's an usual crates.io dependency, |
| 1192 | /// `false` if git/path/alternative registry |
| 1193 | #[track_caller] |
| 1194 | #[must_use] |
| 1195 | pub fn is_crates_iorust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]is_crates_io().(&self) -> bool { |
| 1196 | match self { |
| 1197 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Simplerust-analyzer cargo cargo_toml 0.22.3 Dependency#Simple#(_) => true, |
| 1198 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Detailedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Detailed#(d) => { |
| 1199 | // TODO: allow registry to be set to crates.io explicitly? |
| 1200 | d.pathrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#path..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1201 | d.registryrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#registry..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1202 | d.registry_indexrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#registry_index..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1203 | d.gitrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#git..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1204 | d.tagrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#tag..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1205 | d.branchrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#branch..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1206 | d.revrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#rev..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() |
| 1207 | }, |
| 1208 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Dependency]::Inheritedrust-analyzer cargo cargo_toml 0.22.3 Dependency#Inherited#(_) => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("data not available with workspace inheritance"), |
| 1209 | } |
| 1210 | } |
| 1211 | } |
| 1212 | |
| 1213 | /// When definition of a dependency is more than just a version string. |
| 1214 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1215 | #[serde(rename_all = "kebab-case")] |
| 1216 | pub struct DependencyDetailrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail# { |
| 1217 | /// Semver requirement. Note that a plain version number implies this version *or newer* compatible one. |
| 1218 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1219 | pub versionrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#version.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1220 | |
| 1221 | /// If `Some`, use this as the crate name instead of `[dependencies]`'s table key. |
| 1222 | /// |
| 1223 | /// By using this, a crate can have multiple versions of the same dependency. |
| 1224 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1225 | pub packagerust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#package.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1226 | |
| 1227 | /// Fetch this dependency from a custom 3rd party registry (alias defined in Cargo config), not crates-io. |
| 1228 | /// |
| 1229 | /// This depends on local cargo configuration. It becomes `registry_index` after the crate is uploaded to a registry. |
| 1230 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1231 | pub registryrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#registry.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1232 | |
| 1233 | /// Directly define custom 3rd party registry URL (may be `sparse+https:`) instead of a config nickname. |
| 1234 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1235 | pub registry_indexrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#registry_index.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1236 | |
| 1237 | /// This path is usually relative to the crate's manifest, but when using workspace inheritance, it may be relative to the workspace! |
| 1238 | /// |
| 1239 | /// When calling [`Manifest::complete_from_path_and_workspace`] use absolute path for the workspace manifest, and then this will be corrected to be an absolute |
| 1240 | /// path when inherited from the workspace. |
| 1241 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1242 | pub pathrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#path.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1243 | |
| 1244 | /// If true, the dependency has been defined at the workspace level, so the `path` is joined with workspace's base path. |
| 1245 | /// |
| 1246 | /// This is a field added by this crate, does not exist in TOML. |
| 1247 | /// Note that `Dependency::Simple` won't have this flag, even if it was inherited. |
| 1248 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip)] |
| 1249 | pub inheritedrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#inherited.: bool, |
| 1250 | |
| 1251 | /// Read dependency from git repo URL, not allowed on crates-io. |
| 1252 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1253 | pub gitrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#git.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1254 | /// Read dependency from git branch, not allowed on crates-io. |
| 1255 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1256 | pub branchrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#branch.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1257 | /// Read dependency from git tag, not allowed on crates-io. |
| 1258 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1259 | pub tagrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#tag.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1260 | /// Read dependency from git commit, not allowed on crates-io. |
| 1261 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1262 | pub revrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#rev.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1263 | |
| 1264 | /// Enable these features of the dependency. |
| 1265 | /// |
| 1266 | /// Note that Cargo interprets `default` in a special way. |
| 1267 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 1268 | pub featuresrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#features.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1269 | |
| 1270 | /// NB: Not allowed at workspace level |
| 1271 | /// |
| 1272 | /// If not used with `dep:` or `?/` syntax in `[features]`, this also creates an implicit feature. |
| 1273 | /// See the [`features`] module for more info. |
| 1274 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "is_false")] |
| 1275 | pub optionalrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#optional.: bool, |
| 1276 | |
| 1277 | /// Enable the `default` set of features of the dependency (enabled by default). |
| 1278 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 1279 | pub default_featuresrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#default_features.: bool, |
| 1280 | |
| 1281 | /// Contains the remaining unstable keys and values for the dependency. |
| 1282 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(flatten)] |
| 1283 | pub unstablerust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#unstable.: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#>, |
| 1284 | } |
| 1285 | |
| 1286 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for DependencyDetailrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail# { |
| 1287 | fn defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[DependencyDetail][Default]default().() -> Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DependencyDetail][Default] { |
| 1288 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[DependencyDetail][Default] { |
| 1289 | versionrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#version.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1290 | registryrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#registry.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1291 | registry_indexrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#registry_index.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1292 | pathrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#path.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1293 | inheritedrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#inherited.: false, |
| 1294 | gitrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#git.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1295 | branchrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#branch.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1296 | tagrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#tag.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1297 | revrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#rev.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1298 | featuresrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#features.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(), |
| 1299 | optionalrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#optional.: false, |
| 1300 | default_featuresrust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#default_features.: true, // != bool::default() |
| 1301 | packagerust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#package.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1302 | unstablerust-analyzer cargo cargo_toml 0.22.3 DependencyDetail#unstable.: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`]new().(), |
| 1303 | } |
| 1304 | } |
| 1305 | } |
| 1306 | |
| 1307 | /// When a dependency is defined as `{ workspace = true }`, |
| 1308 | /// and workspace data hasn't been applied yet. |
| 1309 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1310 | #[serde(rename_all = "kebab-case")] |
| 1311 | pub struct InheritedDependencyDetailrust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail# { |
| 1312 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 1313 | pub featuresrust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail#features.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1314 | |
| 1315 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "is_false")] |
| 1316 | pub optionalrust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail#optional.: bool, |
| 1317 | |
| 1318 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "is_false")] |
| 1319 | pub workspacerust-analyzer cargo cargo_toml 0.22.3 InheritedDependencyDetail#workspace.: bool, |
| 1320 | } |
| 1321 | |
| 1322 | /// The `[package]` section of the [`Manifest`]. This is where crate properties are. |
| 1323 | /// |
| 1324 | /// Note that most of these properties can be inherited from a workspace, and therefore not available just from reading a single `Cargo.toml`. See [`Manifest::inherit_workspace`]. |
| 1325 | /// |
| 1326 | /// You can replace `Metadata` generic type with your own |
| 1327 | /// to parse into something more useful than a generic toml `Value` |
| 1328 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1329 | #[serde(rename_all = "kebab-case")] |
| 1330 | #[non_exhaustive] |
| 1331 | pub struct Packagerust-analyzer cargo cargo_toml 0.22.3 Package#<Metadata = Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#> { |
| 1332 | /// Careful: some names are uppercase, case-sensitive. `-` changes to `_` when used as a Rust identifier. |
| 1333 | pub namerust-analyzer cargo cargo_toml 0.22.3 Package#name.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, |
| 1334 | |
| 1335 | /// See [the `version()` getter for more info](`Package::version()`). |
| 1336 | /// |
| 1337 | /// Must parse as semver, e.g. "1.9.0" |
| 1338 | /// |
| 1339 | /// This field may have unknown value when using workspace inheritance, |
| 1340 | /// and when the `Manifest` has been loaded without its workspace. |
| 1341 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_version")] |
| 1342 | pub versionrust-analyzer cargo cargo_toml 0.22.3 Package#version.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1343 | |
| 1344 | /// Package's edition opt-in. Use [`Package::edition()`] to read it. |
| 1345 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default)] |
| 1346 | pub editionrust-analyzer cargo cargo_toml 0.22.3 Package#edition.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Editionrust-analyzer cargo cargo_toml 0.22.3 Edition#>, |
| 1347 | |
| 1348 | /// MSRV 1.x (beware: does not require semver formatting) |
| 1349 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1350 | pub rust_versionrust-analyzer cargo cargo_toml 0.22.3 Package#rust_version.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1351 | |
| 1352 | /// Build script definition |
| 1353 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1354 | pub buildrust-analyzer cargo cargo_toml 0.22.3 Package#build.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#>, |
| 1355 | |
| 1356 | /// Workspace this package is a member of (`None` if it's implicit) |
| 1357 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1358 | pub workspacerust-analyzer cargo cargo_toml 0.22.3 Package#workspace.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#>, |
| 1359 | |
| 1360 | /// e.g. `["Author <e@mail>", "etc"]` |
| 1361 | /// |
| 1362 | /// Deprecated. |
| 1363 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Inheritable::<Vec<_>>::is_empty")] |
| 1364 | pub authorsrust-analyzer cargo cargo_toml 0.22.3 Package#authors.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1365 | |
| 1366 | /// It doesn't link to anything |
| 1367 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1368 | pub linksrust-analyzer cargo cargo_toml 0.22.3 Package#links.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1369 | |
| 1370 | /// A short blurb about the package. This is not rendered in any format when |
| 1371 | /// uploaded to crates.io (aka this is not markdown). |
| 1372 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1373 | pub descriptionrust-analyzer cargo cargo_toml 0.22.3 Package#description.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1374 | |
| 1375 | /// Project's homepage |
| 1376 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1377 | pub homepagerust-analyzer cargo cargo_toml 0.22.3 Package#homepage.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1378 | |
| 1379 | /// Path to your custom docs. Unnecssary if you rely on docs.rs. |
| 1380 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1381 | pub documentationrust-analyzer cargo cargo_toml 0.22.3 Package#documentation.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1382 | |
| 1383 | /// This points to a file under the package root (relative to this `Cargo.toml`). |
| 1384 | /// implied if README.md, README.txt or README exists. |
| 1385 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Inheritable::is_default")] |
| 1386 | pub readmerust-analyzer cargo cargo_toml 0.22.3 Package#readme.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#>, |
| 1387 | |
| 1388 | /// Up to 5, for search |
| 1389 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Inheritable::<Vec<_>>::is_empty")] |
| 1390 | pub keywordsrust-analyzer cargo cargo_toml 0.22.3 Package#keywords.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1391 | |
| 1392 | /// This is a list of up to five categories where this crate would fit. |
| 1393 | /// e.g. `["command-line-utilities", "development-tools::cargo-plugins"]` |
| 1394 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Inheritable::<Vec<_>>::is_empty")] |
| 1395 | pub categoriesrust-analyzer cargo cargo_toml 0.22.3 Package#categories.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1396 | |
| 1397 | /// Don't publish these files |
| 1398 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Inheritable::<Vec<_>>::is_empty")] |
| 1399 | pub excluderust-analyzer cargo cargo_toml 0.22.3 Package#exclude.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1400 | |
| 1401 | /// Publish these files |
| 1402 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Inheritable::<Vec<_>>::is_empty")] |
| 1403 | pub includerust-analyzer cargo cargo_toml 0.22.3 Package#include.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1404 | |
| 1405 | /// e.g. "MIT" |
| 1406 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1407 | pub licenserust-analyzer cargo cargo_toml 0.22.3 Package#license.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1408 | |
| 1409 | /// If `license` is not standard |
| 1410 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1411 | pub license_filerust-analyzer cargo cargo_toml 0.22.3 Package#license_file.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#>>, |
| 1412 | |
| 1413 | /// (HTTPS) URL to crate's repository |
| 1414 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1415 | pub repositoryrust-analyzer cargo cargo_toml 0.22.3 Package#repository.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>, |
| 1416 | |
| 1417 | /// The default binary to run by cargo run. |
| 1418 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1419 | pub default_runrust-analyzer cargo cargo_toml 0.22.3 Package#default_run.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1420 | |
| 1421 | /// Discover binaries from the file system |
| 1422 | /// |
| 1423 | /// This may be incorrectly set to `true` if the crate uses 2015 edition and has explicit `[[bin]]` sections |
| 1424 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 1425 | pub autobinsrust-analyzer cargo cargo_toml 0.22.3 Package#autobins.: bool, |
| 1426 | |
| 1427 | /// Discover libraries from the file system |
| 1428 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 1429 | pub autolibrust-analyzer cargo cargo_toml 0.22.3 Package#autolib.: bool, |
| 1430 | |
| 1431 | /// Discover examples from the file system |
| 1432 | /// |
| 1433 | /// This may be incorrectly set to `true` if the crate uses 2015 edition and has explicit `[[example]]` sections |
| 1434 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 1435 | pub autoexamplesrust-analyzer cargo cargo_toml 0.22.3 Package#autoexamples.: bool, |
| 1436 | |
| 1437 | /// Discover tests from the file system |
| 1438 | /// |
| 1439 | /// This may be incorrectly set to `true` if the crate uses 2015 edition and has explicit `[[test]]` sections |
| 1440 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 1441 | pub autotestsrust-analyzer cargo cargo_toml 0.22.3 Package#autotests.: bool, |
| 1442 | |
| 1443 | /// Discover benchmarks from the file system |
| 1444 | /// |
| 1445 | /// This may be incorrectly set to `true` if the crate uses 2015 edition and has explicit `[[bench]]` sections |
| 1446 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 1447 | pub autobenchesrust-analyzer cargo cargo_toml 0.22.3 Package#autobenches.: bool, |
| 1448 | |
| 1449 | /// Disable publishing or select custom registries. |
| 1450 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Inheritable::is_default")] |
| 1451 | pub publishrust-analyzer cargo cargo_toml 0.22.3 Package#publish.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#>, |
| 1452 | |
| 1453 | /// The feature resolver version. |
| 1454 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 1455 | pub resolverrust-analyzer cargo cargo_toml 0.22.3 Package#resolver.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Resolverrust-analyzer cargo cargo_toml 0.22.3 Resolver#>, |
| 1456 | |
| 1457 | /// Arbitrary metadata of any type, an extension point for 3rd party tools. |
| 1458 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")] |
| 1459 | pub metadatarust-analyzer cargo cargo_toml 0.22.3 Package#metadata.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Metadata>, |
| 1460 | } |
| 1461 | |
| 1462 | #[allow(deprecated)] |
| 1463 | impl<Metadata> Packagerust-analyzer cargo cargo_toml 0.22.3 Package#<Metadata> { |
| 1464 | /// Prefer creating it by parsing a [`Manifest`] instead. |
| 1465 | pub fn newrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]new().(name: impl Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, version: impl Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>) -> Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`] { |
| 1466 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`] { |
| 1467 | namerust-analyzer cargo cargo_toml 0.22.3 Package#name.: name.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(), |
| 1468 | versionrust-analyzer cargo cargo_toml 0.22.3 Package#version.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#(version.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().()), |
| 1469 | editionrust-analyzer cargo cargo_toml 0.22.3 Package#edition.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#(Editionrust-analyzer cargo cargo_toml 0.22.3 Edition#::E2021rust-analyzer cargo cargo_toml 0.22.3 Edition#E2021#), |
| 1470 | rust_versionrust-analyzer cargo cargo_toml 0.22.3 Package#rust_version.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1471 | buildrust-analyzer cargo cargo_toml 0.22.3 Package#build.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1472 | workspacerust-analyzer cargo cargo_toml 0.22.3 Package#workspace.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1473 | authorsrust-analyzer cargo cargo_toml 0.22.3 Package#authors.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`][Default]default().(), |
| 1474 | linksrust-analyzer cargo cargo_toml 0.22.3 Package#links.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1475 | descriptionrust-analyzer cargo cargo_toml 0.22.3 Package#description.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1476 | homepagerust-analyzer cargo cargo_toml 0.22.3 Package#homepage.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1477 | documentationrust-analyzer cargo cargo_toml 0.22.3 Package#documentation.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1478 | readmerust-analyzer cargo cargo_toml 0.22.3 Package#readme.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#(OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile#::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(true)), |
| 1479 | keywordsrust-analyzer cargo cargo_toml 0.22.3 Package#keywords.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`][Default]default().(), |
| 1480 | categoriesrust-analyzer cargo cargo_toml 0.22.3 Package#categories.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`][Default]default().(), |
| 1481 | excluderust-analyzer cargo cargo_toml 0.22.3 Package#exclude.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`][Default]default().(), |
| 1482 | includerust-analyzer cargo cargo_toml 0.22.3 Package#include.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`][Default]default().(), |
| 1483 | licenserust-analyzer cargo cargo_toml 0.22.3 Package#license.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1484 | license_filerust-analyzer cargo cargo_toml 0.22.3 Package#license_file.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1485 | repositoryrust-analyzer cargo cargo_toml 0.22.3 Package#repository.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1486 | default_runrust-analyzer cargo cargo_toml 0.22.3 Package#default_run.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1487 | autolibrust-analyzer cargo cargo_toml 0.22.3 Package#autolib.: true, |
| 1488 | autobinsrust-analyzer cargo cargo_toml 0.22.3 Package#autobins.: true, |
| 1489 | autoexamplesrust-analyzer cargo cargo_toml 0.22.3 Package#autoexamples.: true, |
| 1490 | autotestsrust-analyzer cargo cargo_toml 0.22.3 Package#autotests.: true, |
| 1491 | autobenchesrust-analyzer cargo cargo_toml 0.22.3 Package#autobenches.: true, |
| 1492 | publishrust-analyzer cargo cargo_toml 0.22.3 Package#publish.: Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#(Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#::Flagrust-analyzer cargo cargo_toml 0.22.3 Publish#Flag#(true)), |
| 1493 | resolverrust-analyzer cargo cargo_toml 0.22.3 Package#resolver.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1494 | metadatarust-analyzer cargo cargo_toml 0.22.3 Package#metadata.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1495 | } |
| 1496 | } |
| 1497 | |
| 1498 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1499 | /// |
| 1500 | /// [`Manifest::from_str`] does not know where the TOML data came from, so it has no way of |
| 1501 | /// searching the file system (or tarball or git) for a matching |
| 1502 | /// [Cargo Workspace Manifest](https://doc.rust-lang.org/cargo/reference/workspaces.html). |
| 1503 | /// |
| 1504 | /// Without a workspace, properties that use |
| 1505 | /// [inheritance](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-package-table) |
| 1506 | /// are missing data, and therefore can't be returned, and will panic. |
| 1507 | /// |
| 1508 | /// You can access these properties directly, they are an [`Inheritable`] enum. |
| 1509 | /// |
| 1510 | /// The version will default to `0.0.0` if the `version` field was absent in the manifest. |
| 1511 | #[track_caller] |
| 1512 | #[inline] |
| 1513 | pub fn versionrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]version().(&self) -> &str { |
| 1514 | self.versionrust-analyzer cargo cargo_toml 0.22.3 Package#version..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1515 | } |
| 1516 | |
| 1517 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1518 | /// |
| 1519 | /// See [`version`](`Package::version()`) for more information. |
| 1520 | #[track_caller] |
| 1521 | #[inline] |
| 1522 | pub fn authorsrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]authors().(&self) -> &[Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#] { |
| 1523 | self.authorsrust-analyzer cargo cargo_toml 0.22.3 Package#authors..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1524 | } |
| 1525 | |
| 1526 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1527 | /// |
| 1528 | /// See [`version`](`Package::version()`) for more information. |
| 1529 | #[track_caller] |
| 1530 | #[inline] |
| 1531 | pub fn categoriesrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]categories().(&self) -> &[Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#] { |
| 1532 | self.categoriesrust-analyzer cargo cargo_toml 0.22.3 Package#categories..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1533 | } |
| 1534 | |
| 1535 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1536 | /// |
| 1537 | /// See [`version`](`Package::version()`) for more information. |
| 1538 | #[track_caller] |
| 1539 | #[inline] |
| 1540 | pub fn categories_mutrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]categories_mut().(&mut self) -> &mut Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> { |
| 1541 | self.categoriesrust-analyzer cargo cargo_toml 0.22.3 Package#categories..as_mutrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_mut().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1542 | } |
| 1543 | |
| 1544 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1545 | /// |
| 1546 | /// See [`version`](`Package::version()`) for more information. |
| 1547 | #[track_caller] |
| 1548 | #[inline] |
| 1549 | pub fn descriptionrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]description().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1550 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.descriptionrust-analyzer cargo cargo_toml 0.22.3 Package#description..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().()) |
| 1551 | } |
| 1552 | |
| 1553 | #[inline] |
| 1554 | pub fn set_descriptionrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]set_description().(&mut self, description: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>) { |
| 1555 | self.descriptionrust-analyzer cargo cargo_toml 0.22.3 Package#description. = description.maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#); |
| 1556 | } |
| 1557 | |
| 1558 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1559 | /// |
| 1560 | /// See [`version`](`Package::version()`) for more information. |
| 1561 | #[track_caller] |
| 1562 | #[inline] |
| 1563 | pub fn documentationrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]documentation().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1564 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.documentationrust-analyzer cargo cargo_toml 0.22.3 Package#documentation..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().()) |
| 1565 | } |
| 1566 | |
| 1567 | #[inline] |
| 1568 | pub fn set_documentationrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]set_documentation().(&mut self, documentation: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>) { |
| 1569 | self.documentationrust-analyzer cargo cargo_toml 0.22.3 Package#documentation. = documentation.maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#); |
| 1570 | } |
| 1571 | |
| 1572 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1573 | /// |
| 1574 | /// See [`version`](`Package::version()`) for more information. |
| 1575 | #[track_caller] |
| 1576 | #[inline] |
| 1577 | pub fn editionrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]edition().(&self) -> Editionrust-analyzer cargo cargo_toml 0.22.3 Edition# { |
| 1578 | self.editionrust-analyzer cargo cargo_toml 0.22.3 Package#edition..unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1579 | } |
| 1580 | |
| 1581 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1582 | /// |
| 1583 | /// See [`version`](`Package::version()`) for more information. |
| 1584 | #[track_caller] |
| 1585 | #[inline] |
| 1586 | pub fn excluderust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]exclude().(&self) -> &[Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#] { |
| 1587 | self.excluderust-analyzer cargo cargo_toml 0.22.3 Package#exclude..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1588 | } |
| 1589 | |
| 1590 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1591 | /// |
| 1592 | /// See [`version`](`Package::version()`) for more information. |
| 1593 | #[track_caller] |
| 1594 | #[inline] |
| 1595 | pub fn includerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]include().(&self) -> &[Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#] { |
| 1596 | self.includerust-analyzer cargo cargo_toml 0.22.3 Package#include..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1597 | } |
| 1598 | |
| 1599 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1600 | /// |
| 1601 | /// See [`version`](`Package::version()`) for more information. |
| 1602 | #[track_caller] |
| 1603 | #[inline] |
| 1604 | pub fn homepagerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]homepage().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1605 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.homepagerust-analyzer cargo cargo_toml 0.22.3 Package#homepage..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().()) |
| 1606 | } |
| 1607 | |
| 1608 | #[inline] |
| 1609 | pub fn set_homepagerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]set_homepage().(&mut self, homepage: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>) { |
| 1610 | self.homepagerust-analyzer cargo cargo_toml 0.22.3 Package#homepage. = homepage.maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#); |
| 1611 | } |
| 1612 | |
| 1613 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1614 | /// |
| 1615 | /// See [`version`](`Package::version()`) for more information. |
| 1616 | #[track_caller] |
| 1617 | #[inline] |
| 1618 | pub fn keywordsrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]keywords().(&self) -> &[Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#] { |
| 1619 | self.keywordsrust-analyzer cargo cargo_toml 0.22.3 Package#keywords..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1620 | } |
| 1621 | |
| 1622 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1623 | /// |
| 1624 | /// See [`version`](`Package::version()`) for more information. |
| 1625 | #[track_caller] |
| 1626 | #[inline] |
| 1627 | pub fn licenserust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]license().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1628 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.licenserust-analyzer cargo cargo_toml 0.22.3 Package#license..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().()) |
| 1629 | } |
| 1630 | |
| 1631 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1632 | /// |
| 1633 | /// See [`version`](`Package::version()`) for more information. |
| 1634 | #[track_caller] |
| 1635 | #[inline] |
| 1636 | pub fn license_filerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]license_file().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#> { |
| 1637 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.license_filerust-analyzer cargo cargo_toml 0.22.3 Package#license_file..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().()) |
| 1638 | } |
| 1639 | |
| 1640 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1641 | /// |
| 1642 | /// See [`version`](`Package::version()`) for more information. |
| 1643 | #[track_caller] |
| 1644 | #[inline] |
| 1645 | pub fn publishrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]publish().(&self) -> &Publishrust-analyzer cargo cargo_toml 0.22.3 Publish# { |
| 1646 | self.publishrust-analyzer cargo cargo_toml 0.22.3 Package#publish..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1647 | } |
| 1648 | |
| 1649 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1650 | /// |
| 1651 | /// See [`version`](`Package::version()`) for more information. |
| 1652 | #[track_caller] |
| 1653 | #[inline] |
| 1654 | pub fn readmerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]readme().(&self) -> &OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile# { |
| 1655 | self.readmerust-analyzer cargo cargo_toml 0.22.3 Package#readme..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().() |
| 1656 | } |
| 1657 | |
| 1658 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1659 | /// |
| 1660 | /// See [`version`](`Package::version()`) for more information. |
| 1661 | #[track_caller] |
| 1662 | #[inline] |
| 1663 | pub fn repositoryrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]repository().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1664 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.repositoryrust-analyzer cargo cargo_toml 0.22.3 Package#repository..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().()) |
| 1665 | } |
| 1666 | |
| 1667 | pub fn set_repositoryrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]set_repository().(&mut self, repository: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>) { |
| 1668 | self.repositoryrust-analyzer cargo cargo_toml 0.22.3 Package#repository. = repository.maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#); |
| 1669 | } |
| 1670 | |
| 1671 | /// Panics if the field is not available (inherited from a workspace that hasn't been loaded) |
| 1672 | /// |
| 1673 | /// See [`version`](`Package::version()`) for more information. |
| 1674 | #[track_caller] |
| 1675 | #[inline] |
| 1676 | pub fn rust_versionrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]rust_version().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1677 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.rust_versionrust-analyzer cargo cargo_toml 0.22.3 Package#rust_version..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..as_refrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]as_ref().().unwraprust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]unwrap().()) |
| 1678 | } |
| 1679 | |
| 1680 | pub fn set_rust_versionrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]set_rust_version().(&mut self, rust_version: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>) { |
| 1681 | self.rust_versionrust-analyzer cargo cargo_toml 0.22.3 Package#rust_version. = rust_version.maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#); |
| 1682 | } |
| 1683 | |
| 1684 | /// The property that doesn't actually link with anything. |
| 1685 | /// |
| 1686 | /// Can't be inherited. |
| 1687 | #[inline] |
| 1688 | pub fn linksrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]links().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str> { |
| 1689 | self.linksrust-analyzer cargo cargo_toml 0.22.3 Package#links..as_derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_deref().() |
| 1690 | } |
| 1691 | |
| 1692 | /// Name of the package/crate. Libraries and binaries can override it. |
| 1693 | /// |
| 1694 | /// Can't be inherited. |
| 1695 | #[inline] |
| 1696 | pub fn namerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]name().(&self) -> &str { |
| 1697 | &self.namerust-analyzer cargo cargo_toml 0.22.3 Package#name. |
| 1698 | } |
| 1699 | |
| 1700 | /// If `true`, some fields are unavailable. |
| 1701 | /// |
| 1702 | /// It is `false` in manifests that use inheritance, but had their data completed from the root manifest already. |
| 1703 | fn needs_workspace_inheritancerust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]needs_workspace_inheritance().(&self) -> bool { |
| 1704 | !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(self.authorsrust-analyzer cargo cargo_toml 0.22.3 Package#authors..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().() && |
| 1705 | self.categoriesrust-analyzer cargo cargo_toml 0.22.3 Package#categories..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().() && |
| 1706 | self.editionrust-analyzer cargo cargo_toml 0.22.3 Package#edition..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().() && |
| 1707 | self.excluderust-analyzer cargo cargo_toml 0.22.3 Package#exclude..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().() && |
| 1708 | self.includerust-analyzer cargo cargo_toml 0.22.3 Package#include..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().() && |
| 1709 | self.keywordsrust-analyzer cargo cargo_toml 0.22.3 Package#keywords..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().() && |
| 1710 | self.versionrust-analyzer cargo cargo_toml 0.22.3 Package#version..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().() && |
| 1711 | self.descriptionrust-analyzer cargo cargo_toml 0.22.3 Package#description..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().map_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map_or().(true, Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().) && |
| 1712 | self.documentationrust-analyzer cargo cargo_toml 0.22.3 Package#documentation..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().map_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map_or().(true, Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().) && |
| 1713 | self.homepagerust-analyzer cargo cargo_toml 0.22.3 Package#homepage..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().map_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map_or().(true, Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().) && |
| 1714 | self.licenserust-analyzer cargo cargo_toml 0.22.3 Package#license..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().map_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map_or().(true, Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().) && |
| 1715 | self.license_filerust-analyzer cargo cargo_toml 0.22.3 Package#license_file..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().map_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map_or().(true, Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().) && |
| 1716 | self.repositoryrust-analyzer cargo cargo_toml 0.22.3 Package#repository..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().map_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map_or().(true, Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().) && |
| 1717 | self.rust_versionrust-analyzer cargo cargo_toml 0.22.3 Package#rust_version..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().map_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map_or().(true, Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().) && |
| 1718 | self.publishrust-analyzer cargo cargo_toml 0.22.3 Package#publish..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().() && |
| 1719 | self.readmerust-analyzer cargo cargo_toml 0.22.3 Package#readme..is_setrust-analyzer cargo cargo_toml 0.22.3 inheritable/impl#[`Inheritable<T>`]is_set().()) |
| 1720 | } |
| 1721 | } |
| 1722 | |
| 1723 | impl<Metadata: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#> Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for Packagerust-analyzer cargo cargo_toml 0.22.3 Package#<Metadata> { |
| 1724 | fn defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`][Default]default().() -> Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`][Default] { Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`][Default]::newrust-analyzer cargo cargo_toml 0.22.3 impl#[`Package<Metadata>`]new().("", "") } |
| 1725 | } |
| 1726 | |
| 1727 | /// A way specify or disable README or `build.rs`. |
| 1728 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1729 | #[serde(untagged, expecting = "the value should be either a boolean or a file path")] |
| 1730 | pub enum OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile# { |
| 1731 | /// Opt-in to default, or explicit opt-out |
| 1732 | Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(bool), |
| 1733 | /// Explicit path |
| 1734 | Pathrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Path#(PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#), |
| 1735 | } |
| 1736 | |
| 1737 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile# { |
| 1738 | #[inline] |
| 1739 | fn defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile][Default]default().() -> Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile][Default] { Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile][Default]::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(true) } |
| 1740 | } |
| 1741 | |
| 1742 | impl OptionalFilerust-analyzer cargo cargo_toml 0.22.3 OptionalFile# { |
| 1743 | #[must_use] |
| 1744 | pub fn displayrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]display().(&self) -> &str { |
| 1745 | match self { |
| 1746 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]::Pathrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Path#(p) => p.to_strrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]to_str().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("<non-utf8>"), |
| 1747 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(true) => "<default>", |
| 1748 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(false) => "<disabled>", |
| 1749 | } |
| 1750 | } |
| 1751 | |
| 1752 | #[inline] |
| 1753 | fn is_defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]is_default().(&self) -> bool { |
| 1754 | matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(self, Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(flag) if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().flag) |
| 1755 | } |
| 1756 | |
| 1757 | /// This returns `none` even if `Flag(true)` is set. |
| 1758 | #[inline] |
| 1759 | #[must_use] |
| 1760 | pub fn as_pathrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]as_path().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#> { |
| 1761 | match self { |
| 1762 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]::Pathrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Path#(p) => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(p), |
| 1763 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(_) => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 1764 | } |
| 1765 | } |
| 1766 | |
| 1767 | #[inline] |
| 1768 | #[must_use] |
| 1769 | pub fn is_somerust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]is_some().(&self) -> bool { |
| 1770 | matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(self, Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]::Flagrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Flag#(true) | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[OptionalFile]::Pathrust-analyzer cargo cargo_toml 0.22.3 OptionalFile#Path#(_)) |
| 1771 | } |
| 1772 | } |
| 1773 | |
| 1774 | /// Forbids or selects custom registry |
| 1775 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1776 | #[serde(untagged, expecting = "the value should be either a boolean, or an array of registry names")] |
| 1777 | pub enum Publishrust-analyzer cargo cargo_toml 0.22.3 Publish# { |
| 1778 | Flagrust-analyzer cargo cargo_toml 0.22.3 Publish#Flag#(bool), |
| 1779 | Registryrust-analyzer cargo cargo_toml 0.22.3 Publish#Registry#(Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>), |
| 1780 | } |
| 1781 | |
| 1782 | impl Publishrust-analyzer cargo cargo_toml 0.22.3 Publish# { |
| 1783 | fn is_defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Publish]is_default().(&self) -> bool { |
| 1784 | matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(self, Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Publish]::Flagrust-analyzer cargo cargo_toml 0.22.3 Publish#Flag#(flag) if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().flag) |
| 1785 | } |
| 1786 | } |
| 1787 | |
| 1788 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for Publishrust-analyzer cargo cargo_toml 0.22.3 Publish# { |
| 1789 | #[inline] |
| 1790 | fn defaultrust-analyzer cargo cargo_toml 0.22.3 impl#[Publish][Default]default().() -> Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Publish][Default] { Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Publish][Default]::Flagrust-analyzer cargo cargo_toml 0.22.3 Publish#Flag#(true) } |
| 1791 | } |
| 1792 | |
| 1793 | impl PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#<Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#> for bool { |
| 1794 | #[inline] |
| 1795 | fn eqrust-analyzer cargo cargo_toml 0.22.3 impl#[bool][`PartialEq<Publish>`]eq().(&self, p: &Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#) -> bool { |
| 1796 | match p { |
| 1797 | Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#::Flagrust-analyzer cargo cargo_toml 0.22.3 Publish#Flag#(flag) => *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().flag rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[bool][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[bool][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[bool][`PartialEq<Self>`]eq().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self, |
| 1798 | Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#::Registryrust-analyzer cargo cargo_toml 0.22.3 Publish#Registry#(reg) => reg.is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]is_empty().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[bool][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[bool][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[bool][`PartialEq<Self>`]ne().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self, |
| 1799 | } |
| 1800 | } |
| 1801 | } |
| 1802 | |
| 1803 | impl PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#<bool> for Publishrust-analyzer cargo cargo_toml 0.22.3 Publish# { |
| 1804 | #[inline] |
| 1805 | fn eqrust-analyzer cargo cargo_toml 0.22.3 impl#[Publish][`PartialEq<bool>`]eq().(&self, b: &bool) -> bool { |
| 1806 | b.eqrust-analyzer cargo cargo_toml 0.22.3 impl#[bool][`PartialEq<Publish>`]eq().(self) |
| 1807 | } |
| 1808 | } |
| 1809 | |
| 1810 | impl PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#<bool> for &Publishrust-analyzer cargo cargo_toml 0.22.3 Publish# { |
| 1811 | #[inline] |
| 1812 | fn eqrust-analyzer cargo cargo_toml 0.22.3 impl#[`&Publish`][`PartialEq<bool>`]eq().(&self, b: &bool) -> bool { |
| 1813 | b.eqrust-analyzer cargo cargo_toml 0.22.3 impl#[bool][`PartialEq<Publish>`]eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self) |
| 1814 | } |
| 1815 | } |
| 1816 | |
| 1817 | impl PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#<&Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#> for bool { |
| 1818 | #[inline] |
| 1819 | fn eqrust-analyzer cargo cargo_toml 0.22.3 impl#[bool][`PartialEq<&Publish>`]eq().(&self, b: &&Publishrust-analyzer cargo cargo_toml 0.22.3 Publish#) -> bool { |
| 1820 | (*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self).eqrust-analyzer cargo cargo_toml 0.22.3 impl#[bool][`PartialEq<Publish>`]eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().b) |
| 1821 | } |
| 1822 | } |
| 1823 | |
| 1824 | /// In badges section of Cargo.toml |
| 1825 | /// |
| 1826 | /// Mostly obsolete. |
| 1827 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1828 | #[serde(rename_all = "kebab-case")] |
| 1829 | pub struct Badgerust-analyzer cargo cargo_toml 0.22.3 Badge# { |
| 1830 | pub repositoryrust-analyzer cargo cargo_toml 0.22.3 Badge#repository.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, |
| 1831 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_master")] |
| 1832 | pub branchrust-analyzer cargo cargo_toml 0.22.3 Badge#branch.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, |
| 1833 | pub servicerust-analyzer cargo cargo_toml 0.22.3 Badge#service.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1834 | pub idrust-analyzer cargo cargo_toml 0.22.3 Badge#id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1835 | pub project_namerust-analyzer cargo cargo_toml 0.22.3 Badge#project_name.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 1836 | } |
| 1837 | |
| 1838 | fn default_masterrust-analyzer cargo cargo_toml 0.22.3 default_master().() -> Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# { |
| 1839 | "master".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().() |
| 1840 | } |
| 1841 | |
| 1842 | fn ok_or_defaultrust-analyzer cargo cargo_toml 0.22.3 ok_or_default().<'de, T, D>(deserializer: D) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<T, D::Errorrust-analyzer cargo serde_core 1.0.229 de/Deserializer#Error#> |
| 1843 | where |
| 1844 | T: Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#<'de> + Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#, |
| 1845 | D: Deserializerrust-analyzer cargo serde_core 1.0.229 de/Deserializer#<'de>, |
| 1846 | { |
| 1847 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#::deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#deserialize().(deserializer).unwrap_or_defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or_default().()) |
| 1848 | } |
| 1849 | |
| 1850 | fn default_versionrust-analyzer cargo cargo_toml 0.22.3 default_version().() -> Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> { |
| 1851 | Inheritablerust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#::Setrust-analyzer cargo cargo_toml 0.22.3 inheritable/Inheritable#Set#("0.0.0".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()) |
| 1852 | } |
| 1853 | |
| 1854 | /// `[badges]` section of `Cargo.toml`, deprecated by crates-io except `maintenance`. |
| 1855 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1856 | #[serde(rename_all = "kebab-case")] |
| 1857 | pub struct Badgesrust-analyzer cargo cargo_toml 0.22.3 Badges# { |
| 1858 | /// Appveyor: `repository` is required. `branch` is optional; default is `master` |
| 1859 | /// `service` is optional; valid values are `github` (default), `bitbucket`, and |
| 1860 | /// `gitlab`; `id` is optional; you can specify the appveyor project id if you |
| 1861 | /// want to use that instead. `project_name` is optional; use when the repository |
| 1862 | /// name differs from the appveyor project name. |
| 1863 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, deserialize_with = "ok_or_default")] |
| 1864 | pub appveyorrust-analyzer cargo cargo_toml 0.22.3 Badges#appveyor.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Badgerust-analyzer cargo cargo_toml 0.22.3 Badge#>, |
| 1865 | |
| 1866 | /// Circle CI: `repository` is required. `branch` is optional; default is `master` |
| 1867 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, deserialize_with = "ok_or_default")] |
| 1868 | pub circle_cirust-analyzer cargo cargo_toml 0.22.3 Badges#circle_ci.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Badgerust-analyzer cargo cargo_toml 0.22.3 Badge#>, |
| 1869 | |
| 1870 | /// GitLab: `repository` is required. `branch` is optional; default is `master` |
| 1871 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, deserialize_with = "ok_or_default")] |
| 1872 | pub gitlabrust-analyzer cargo cargo_toml 0.22.3 Badges#gitlab.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Badgerust-analyzer cargo cargo_toml 0.22.3 Badge#>, |
| 1873 | |
| 1874 | /// Travis CI: `repository` in format `"<user>/<project>"` is required. |
| 1875 | /// `branch` is optional; default is `master` |
| 1876 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, deserialize_with = "ok_or_default")] |
| 1877 | #[deprecated(note = "badges are deprecated, and travis is dead")] |
| 1878 | pub travis_cirust-analyzer cargo cargo_toml 0.22.3 Badges#travis_ci.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Badgerust-analyzer cargo cargo_toml 0.22.3 Badge#>, |
| 1879 | |
| 1880 | /// Codecov: `repository` is required. `branch` is optional; default is `master` |
| 1881 | /// `service` is optional; valid values are `github` (default), `bitbucket`, and |
| 1882 | /// `gitlab`. |
| 1883 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, deserialize_with = "ok_or_default")] |
| 1884 | pub codecovrust-analyzer cargo cargo_toml 0.22.3 Badges#codecov.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Badgerust-analyzer cargo cargo_toml 0.22.3 Badge#>, |
| 1885 | |
| 1886 | /// Coveralls: `repository` is required. `branch` is optional; default is `master` |
| 1887 | /// `service` is optional; valid values are `github` (default) and `bitbucket`. |
| 1888 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, deserialize_with = "ok_or_default")] |
| 1889 | pub coverallsrust-analyzer cargo cargo_toml 0.22.3 Badges#coveralls.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Badgerust-analyzer cargo cargo_toml 0.22.3 Badge#>, |
| 1890 | |
| 1891 | /// Is it maintained resolution time: `repository` is required. |
| 1892 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, deserialize_with = "ok_or_default")] |
| 1893 | pub is_it_maintained_issue_resolutionrust-analyzer cargo cargo_toml 0.22.3 Badges#is_it_maintained_issue_resolution.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Badgerust-analyzer cargo cargo_toml 0.22.3 Badge#>, |
| 1894 | |
| 1895 | /// Is it maintained percentage of open issues: `repository` is required. |
| 1896 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, deserialize_with = "ok_or_default")] |
| 1897 | pub is_it_maintained_open_issuesrust-analyzer cargo cargo_toml 0.22.3 Badges#is_it_maintained_open_issues.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Badgerust-analyzer cargo cargo_toml 0.22.3 Badge#>, |
| 1898 | |
| 1899 | /// Maintenance: `status` is required. Available options are `actively-developed`, |
| 1900 | /// `passively-maintained`, `as-is`, `experimental`, `looking-for-maintainer`, |
| 1901 | /// `deprecated`, and the default `none`, which displays no badge on crates.io. |
| 1902 | /// |
| 1903 | /// ```toml |
| 1904 | /// [badges] |
| 1905 | /// maintenance.status = "as-is" |
| 1906 | /// ``` |
| 1907 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, deserialize_with = "ok_or_default")] |
| 1908 | pub maintenancerust-analyzer cargo cargo_toml 0.22.3 Badges#maintenance.: Maintenancerust-analyzer cargo cargo_toml 0.22.3 Maintenance#, |
| 1909 | } |
| 1910 | |
| 1911 | impl Badgesrust-analyzer cargo cargo_toml 0.22.3 Badges# { |
| 1912 | #[allow(deprecated)] |
| 1913 | /// Determine whether or not a Profiles struct should be serialized |
| 1914 | fn should_skip_serializingrust-analyzer cargo cargo_toml 0.22.3 impl#[Badges]should_skip_serializing().(&self) -> bool { |
| 1915 | self.appveyorrust-analyzer cargo cargo_toml 0.22.3 Badges#appveyor..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1916 | self.circle_cirust-analyzer cargo cargo_toml 0.22.3 Badges#circle_ci..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1917 | self.gitlabrust-analyzer cargo cargo_toml 0.22.3 Badges#gitlab..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1918 | self.travis_cirust-analyzer cargo cargo_toml 0.22.3 Badges#travis_ci..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1919 | self.codecovrust-analyzer cargo cargo_toml 0.22.3 Badges#codecov..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1920 | self.coverallsrust-analyzer cargo cargo_toml 0.22.3 Badges#coveralls..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1921 | self.is_it_maintained_issue_resolutionrust-analyzer cargo cargo_toml 0.22.3 Badges#is_it_maintained_issue_resolution..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1922 | self.is_it_maintained_open_issuesrust-analyzer cargo cargo_toml 0.22.3 Badges#is_it_maintained_open_issues..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() && |
| 1923 | matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(self.maintenancerust-analyzer cargo cargo_toml 0.22.3 Badges#maintenance..statusrust-analyzer cargo cargo_toml 0.22.3 Maintenance#status., MaintenanceStatusrust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#::Nonerust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#None#) |
| 1924 | } |
| 1925 | } |
| 1926 | |
| 1927 | /// A [`Badges`] field with [`MaintenanceStatus`]. |
| 1928 | /// |
| 1929 | /// ```toml |
| 1930 | /// [badges] |
| 1931 | /// maintenance.status = "experimental" |
| 1932 | /// ``` |
| 1933 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1934 | pub struct Maintenancerust-analyzer cargo cargo_toml 0.22.3 Maintenance# { |
| 1935 | pub statusrust-analyzer cargo cargo_toml 0.22.3 Maintenance#status.: MaintenanceStatusrust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#, |
| 1936 | } |
| 1937 | |
| 1938 | /// Mainly used to deprecate crates. |
| 1939 | /// |
| 1940 | /// ```toml |
| 1941 | /// [badges] |
| 1942 | /// maintenance.status = "deprecated" |
| 1943 | /// ``` |
| 1944 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1945 | #[serde(rename_all = "kebab-case")] |
| 1946 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 1947 | pub enum MaintenanceStatusrust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus# { |
| 1948 | #[defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/default:] |
| 1949 | Nonerust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#None#, |
| 1950 | ActivelyDevelopedrust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#ActivelyDeveloped#, |
| 1951 | PassivelyMaintainedrust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#PassivelyMaintained#, |
| 1952 | AsIsrust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#AsIs#, |
| 1953 | Experimentalrust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#Experimental#, |
| 1954 | LookingForMaintainerrust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#LookingForMaintainer#, |
| 1955 | Deprecatedrust-analyzer cargo cargo_toml 0.22.3 MaintenanceStatus#Deprecated#, |
| 1956 | } |
| 1957 | |
| 1958 | /// Edition setting, which opts in to new Rust/Cargo behaviors. |
| 1959 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord:, PartialOrdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 1960 | #[non_exhaustive] |
| 1961 | #[serde(expecting = "if there's a newer edition, then this parser (cargo_toml crate) has to be updated")] |
| 1962 | pub enum Editionrust-analyzer cargo cargo_toml 0.22.3 Edition# { |
| 1963 | /// 2015 |
| 1964 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "2015")] |
| 1965 | #[defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/default:] |
| 1966 | E2015rust-analyzer cargo cargo_toml 0.22.3 Edition#E2015# = 2015, |
| 1967 | /// 2018 |
| 1968 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "2018")] |
| 1969 | E2018rust-analyzer cargo cargo_toml 0.22.3 Edition#E2018# = 2018, |
| 1970 | /// 2021 |
| 1971 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "2021")] |
| 1972 | E2021rust-analyzer cargo cargo_toml 0.22.3 Edition#E2021# = 2021, |
| 1973 | /// 2024 |
| 1974 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "2024")] |
| 1975 | E2024rust-analyzer cargo cargo_toml 0.22.3 Edition#E2024# = 2024, |
| 1976 | } |
| 1977 | |
| 1978 | impl stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for Editionrust-analyzer cargo cargo_toml 0.22.3 Edition# { |
| 1979 | fn fmtrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition][Display]fmt().(&self, f: &mut stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 1980 | f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(match self { |
| 1981 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition][Display]::E2015rust-analyzer cargo cargo_toml 0.22.3 Edition#E2015# => "2015", |
| 1982 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition][Display]::E2018rust-analyzer cargo cargo_toml 0.22.3 Edition#E2018# => "2018", |
| 1983 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition][Display]::E2021rust-analyzer cargo cargo_toml 0.22.3 Edition#E2021# => "2021", |
| 1984 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition][Display]::E2024rust-analyzer cargo cargo_toml 0.22.3 Edition#E2024# => "2024", |
| 1985 | }) |
| 1986 | } |
| 1987 | } |
| 1988 | |
| 1989 | impl Editionrust-analyzer cargo cargo_toml 0.22.3 Edition# { |
| 1990 | /// Returns minor version (1.x) of the oldest rustc that supports this edition |
| 1991 | #[must_use] |
| 1992 | pub fn min_rust_version_minorrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition]min_rust_version_minor().(self) -> u16 { |
| 1993 | match self { |
| 1994 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition]::E2015rust-analyzer cargo cargo_toml 0.22.3 Edition#E2015# => 1, |
| 1995 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition]::E2018rust-analyzer cargo cargo_toml 0.22.3 Edition#E2018# => 31, |
| 1996 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition]::E2021rust-analyzer cargo cargo_toml 0.22.3 Edition#E2021# => 56, |
| 1997 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Edition]::E2024rust-analyzer cargo cargo_toml 0.22.3 Edition#E2024# => 85, |
| 1998 | } |
| 1999 | } |
| 2000 | } |
| 2001 | |
| 2002 | /// The feature resolver version. |
| 2003 | /// |
| 2004 | /// Needed in [`Workspace`], but implied by [`Edition`] in packages. |
| 2005 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord:, PartialOrdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 2006 | #[serde(expecting = "if there's a newer resolver, then this parser (cargo_toml crate) has to be updated")] |
| 2007 | pub enum Resolverrust-analyzer cargo cargo_toml 0.22.3 Resolver# { |
| 2008 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "1")] |
| 2009 | #[defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/default:] |
| 2010 | /// The default for editions prior to 2021. |
| 2011 | V1rust-analyzer cargo cargo_toml 0.22.3 Resolver#V1# = 1, |
| 2012 | /// The default for the 2021 edition. |
| 2013 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "2")] |
| 2014 | V2rust-analyzer cargo cargo_toml 0.22.3 Resolver#V2# = 2, |
| 2015 | /// The default for the 2024 edition. |
| 2016 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "3")] |
| 2017 | V3rust-analyzer cargo cargo_toml 0.22.3 Resolver#V3# = 3, |
| 2018 | } |
| 2019 | |
| 2020 | impl Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for Resolverrust-analyzer cargo cargo_toml 0.22.3 Resolver# { |
| 2021 | fn fmtrust-analyzer cargo cargo_toml 0.22.3 impl#[Resolver][Display]fmt().(&self, f: &mut stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 2022 | f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(match self { |
| 2023 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Resolver][Display]::V1rust-analyzer cargo cargo_toml 0.22.3 Resolver#V1# => "1", |
| 2024 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Resolver][Display]::V2rust-analyzer cargo cargo_toml 0.22.3 Resolver#V2# => "2", |
| 2025 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Resolver][Display]::V3rust-analyzer cargo cargo_toml 0.22.3 Resolver#V3# => "3", |
| 2026 | }) |
| 2027 | } |
| 2028 | } |
| 2029 | |
| 2030 | /// Lint definition. |
| 2031 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 2032 | #[serde(from = "LintSerdeParser", into = "LintSerdeParser")] |
| 2033 | pub struct Lintrust-analyzer cargo cargo_toml 0.22.3 Lint# { |
| 2034 | /// allow/warn/deny |
| 2035 | pub levelrust-analyzer cargo cargo_toml 0.22.3 Lint#level.: LintLevelrust-analyzer cargo cargo_toml 0.22.3 LintLevel#, |
| 2036 | |
| 2037 | /// Controls which lints or lint groups override other lint groups. |
| 2038 | pub priorityrust-analyzer cargo cargo_toml 0.22.3 Lint#priority.: i8, |
| 2039 | |
| 2040 | /// Unstable |
| 2041 | pub configrust-analyzer cargo cargo_toml 0.22.3 Lint#config.: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, tomlrust-analyzer cargo toml 1.1.4+spec-1.1.0 crate/::Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#>, |
| 2042 | } |
| 2043 | |
| 2044 | /// Internal |
| 2045 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 2046 | #[serde(untagged, expecting = "lints' values should be a string or { level = \"…\", priority = 1 }")] |
| 2047 | enum LintSerdeParserrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser# { |
| 2048 | Simplerust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Simple#(LintLevelrust-analyzer cargo cargo_toml 0.22.3 LintLevel#), |
| 2049 | Detailedrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed# { |
| 2050 | levelrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed#level.: LintLevelrust-analyzer cargo cargo_toml 0.22.3 LintLevel#, |
| 2051 | /// Controls which lints or lint groups override other lint groups. |
| 2052 | #[serde(default)] |
| 2053 | priorityrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed#priority.: i8, |
| 2054 | |
| 2055 | /// Unstable |
| 2056 | #[serde(default, flatten)] |
| 2057 | configrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed#config.: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, tomlrust-analyzer cargo toml 1.1.4+spec-1.1.0 crate/::Valuerust-analyzer cargo toml 1.1.4+spec-1.1.0 value/Value#>, |
| 2058 | }, |
| 2059 | } |
| 2060 | |
| 2061 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<LintSerdeParserrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#> for Lintrust-analyzer cargo cargo_toml 0.22.3 Lint# { |
| 2062 | fn fromrust-analyzer cargo cargo_toml 0.22.3 impl#[Lint][`From<LintSerdeParser>`]from().(parsed: LintSerdeParserrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#) -> Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Lint][`From<LintSerdeParser>`] { |
| 2063 | match parsed { |
| 2064 | LintSerdeParserrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#::Simplerust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Simple#(level) => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Lint][`From<LintSerdeParser>`] { levelrust-analyzer cargo cargo_toml 0.22.3 Lint#level., priorityrust-analyzer cargo cargo_toml 0.22.3 Lint#priority.: 0, configrust-analyzer cargo cargo_toml 0.22.3 Lint#config.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`][Default]default().() }, |
| 2065 | LintSerdeParserrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#::Detailedrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed# { levelrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed#level., priorityrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed#priority., configrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed#config. } => Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[Lint][`From<LintSerdeParser>`] { levelrust-analyzer cargo cargo_toml 0.22.3 Lint#level., priorityrust-analyzer cargo cargo_toml 0.22.3 Lint#priority., configrust-analyzer cargo cargo_toml 0.22.3 Lint#config. }, |
| 2066 | } |
| 2067 | } |
| 2068 | } |
| 2069 | |
| 2070 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<Lintrust-analyzer cargo cargo_toml 0.22.3 Lint#> for LintSerdeParserrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser# { |
| 2071 | fn fromrust-analyzer cargo cargo_toml 0.22.3 impl#[LintSerdeParser][`From<Lint>`]from().(orig: Lintrust-analyzer cargo cargo_toml 0.22.3 Lint#) -> Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LintSerdeParser][`From<Lint>`] { |
| 2072 | if orig.priorityrust-analyzer cargo cargo_toml 0.22.3 Lint#priority. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq().0 && orig.configrust-analyzer cargo cargo_toml 0.22.3 Lint#config..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]is_empty().() { |
| 2073 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LintSerdeParser][`From<Lint>`]::Simplerust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Simple#(orig.levelrust-analyzer cargo cargo_toml 0.22.3 Lint#level.) |
| 2074 | } else { |
| 2075 | Selfrust-analyzer cargo cargo_toml 0.22.3 impl#[LintSerdeParser][`From<Lint>`]::Detailedrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed# { |
| 2076 | levelrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed#level.: orig.levelrust-analyzer cargo cargo_toml 0.22.3 Lint#level., |
| 2077 | priorityrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed#priority.: orig.priorityrust-analyzer cargo cargo_toml 0.22.3 Lint#priority., |
| 2078 | configrust-analyzer cargo cargo_toml 0.22.3 LintSerdeParser#Detailed#config.: orig.configrust-analyzer cargo cargo_toml 0.22.3 Lint#config., |
| 2079 | } |
| 2080 | } |
| 2081 | } |
| 2082 | } |
| 2083 | |
| 2084 | /// Lint level. |
| 2085 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 2086 | #[serde(rename_all = "kebab-case")] |
| 2087 | pub enum LintLevelrust-analyzer cargo cargo_toml 0.22.3 LintLevel# { |
| 2088 | Allowrust-analyzer cargo cargo_toml 0.22.3 LintLevel#Allow#, |
| 2089 | Warnrust-analyzer cargo cargo_toml 0.22.3 LintLevel#Warn#, |
| 2090 | ForceWarnrust-analyzer cargo cargo_toml 0.22.3 LintLevel#ForceWarn#, |
| 2091 | Denyrust-analyzer cargo cargo_toml 0.22.3 LintLevel#Deny#, |
| 2092 | Forbidrust-analyzer cargo cargo_toml 0.22.3 LintLevel#Forbid#, |
| 2093 | } |
| 2094 | |
| 2095 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 2096 | #[non_exhaustive] |
| 2097 | struct Rfc3416FeatureDetailrust-analyzer cargo cargo_toml 0.22.3 Rfc3416FeatureDetail# { |
| 2098 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")] |
| 2099 | pub enablesrust-analyzer cargo cargo_toml 0.22.3 Rfc3416FeatureDetail#enables.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 2100 | |
| 2101 | #[allow(unused)] |
| 2102 | /// `public` indicates whether or not the feature should be visible in documentation, and defaults to true |
| 2103 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default = "default_true", skip_serializing_if = "is_true")] |
| 2104 | pub publicrust-analyzer cargo cargo_toml 0.22.3 Rfc3416FeatureDetail#public.: bool, |
| 2105 | |
| 2106 | #[allow(unused)] |
| 2107 | /// Add a description to the feature |
| 2108 | #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")] |
| 2109 | pub docrust-analyzer cargo cargo_toml 0.22.3 Rfc3416FeatureDetail#doc.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 2110 | } |
| 2111 | |
| 2112 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 2113 | #[serde(untagged)] |
| 2114 | enum Rfc3416Featurerust-analyzer cargo cargo_toml 0.22.3 Rfc3416Feature# { |
| 2115 | Simplerust-analyzer cargo cargo_toml 0.22.3 Rfc3416Feature#Simple#(Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>), |
| 2116 | Detailedrust-analyzer cargo cargo_toml 0.22.3 Rfc3416Feature#Detailed#(Rfc3416FeatureDetailrust-analyzer cargo cargo_toml 0.22.3 Rfc3416FeatureDetail#), |
| 2117 | } |
| 2118 | |
| 2119 | fn feature_setrust-analyzer cargo cargo_toml 0.22.3 feature_set().<'de, D>(deserializer: D) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<FeatureSetrust-analyzer cargo cargo_toml 0.22.3 FeatureSet#, D::Errorrust-analyzer cargo serde_core 1.0.229 de/Deserializer#Error#> where D: Deserializerrust-analyzer cargo serde_core 1.0.229 de/Deserializer#<'de> { |
| 2120 | let detailed = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Rfc3416Featurerust-analyzer cargo cargo_toml 0.22.3 Rfc3416Feature#>::deserializerust-analyzer cargo serde_core 1.0.229 de/impls/impl#[`BTreeMap<K, V>`][`Deserialize<'de>`]deserialize().(deserializer)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 2121 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(detailed.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`][IntoIterator]into_iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|(k, v)| (k, match v { |
| 2122 | Rfc3416Featurerust-analyzer cargo cargo_toml 0.22.3 Rfc3416Feature#::Simplerust-analyzer cargo cargo_toml 0.22.3 Rfc3416Feature#Simple#(f) => f, |
| 2123 | Rfc3416Featurerust-analyzer cargo cargo_toml 0.22.3 Rfc3416Feature#::Detailedrust-analyzer cargo cargo_toml 0.22.3 Rfc3416Feature#Detailed#(d) => d.enablesrust-analyzer cargo cargo_toml 0.22.3 Rfc3416FeatureDetail#enables., |
| 2124 | })).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().()) |
| 2125 | } |