Struct cargo::util::toml::InheritableFields
source · pub struct InheritableFields {Show 20 fields
dependencies: Option<BTreeMap<String, TomlDependency>>,
lints: Option<TomlLints>,
version: Option<Version>,
authors: Option<Vec<String>>,
description: Option<String>,
homepage: Option<String>,
documentation: Option<String>,
readme: Option<StringOrBool>,
keywords: Option<Vec<String>>,
categories: Option<Vec<String>>,
license: Option<String>,
license_file: Option<String>,
repository: Option<String>,
publish: Option<VecStringOrBool>,
edition: Option<String>,
badges: Option<BTreeMap<String, BTreeMap<String, String>>>,
exclude: Option<Vec<String>>,
include: Option<Vec<String>>,
rust_version: Option<RustVersion>,
ws_root: PathBuf,
}
Expand description
A group of fields that are inheritable by members of the workspace
Fields§
§dependencies: Option<BTreeMap<String, TomlDependency>>
§lints: Option<TomlLints>
§version: Option<Version>
§description: Option<String>
§homepage: Option<String>
§documentation: Option<String>
§readme: Option<StringOrBool>
§keywords: Option<Vec<String>>
§categories: Option<Vec<String>>
§license: Option<String>
§license_file: Option<String>
§repository: Option<String>
§publish: Option<VecStringOrBool>
§edition: Option<String>
§badges: Option<BTreeMap<String, BTreeMap<String, String>>>
§exclude: Option<Vec<String>>
§include: Option<Vec<String>>
§rust_version: Option<RustVersion>
§ws_root: PathBuf
Implementations§
source§impl InheritableFields
impl InheritableFields
sourcepub fn dependencies(&self) -> CargoResult<BTreeMap<String, TomlDependency>>
pub fn dependencies(&self) -> CargoResult<BTreeMap<String, TomlDependency>>
Gets the field workspace.dependencies
.
sourcepub fn lints(&self) -> CargoResult<TomlLints>
pub fn lints(&self) -> CargoResult<TomlLints>
Gets the field workspace.lints
.
Gets the field workspace.package.authors
.
sourcepub fn badges(&self) -> CargoResult<BTreeMap<String, BTreeMap<String, String>>>
pub fn badges(&self) -> CargoResult<BTreeMap<String, BTreeMap<String, String>>>
Gets the field workspace.package.badges
.
sourcepub fn categories(&self) -> CargoResult<Vec<String>>
pub fn categories(&self) -> CargoResult<Vec<String>>
Gets the field workspace.package.categories
.
sourcepub fn description(&self) -> CargoResult<String>
pub fn description(&self) -> CargoResult<String>
Gets the field workspace.package.description
.
sourcepub fn documentation(&self) -> CargoResult<String>
pub fn documentation(&self) -> CargoResult<String>
Gets the field workspace.package.documentation
.
sourcepub fn edition(&self) -> CargoResult<String>
pub fn edition(&self) -> CargoResult<String>
Gets the field workspace.package.edition
.
sourcepub fn exclude(&self) -> CargoResult<Vec<String>>
pub fn exclude(&self) -> CargoResult<Vec<String>>
Gets the field workspace.package.exclude
.
sourcepub fn homepage(&self) -> CargoResult<String>
pub fn homepage(&self) -> CargoResult<String>
Gets the field workspace.package.homepage
.
sourcepub fn include(&self) -> CargoResult<Vec<String>>
pub fn include(&self) -> CargoResult<Vec<String>>
Gets the field workspace.package.include
.
sourcepub fn keywords(&self) -> CargoResult<Vec<String>>
pub fn keywords(&self) -> CargoResult<Vec<String>>
Gets the field workspace.package.keywords
.
sourcepub fn license(&self) -> CargoResult<String>
pub fn license(&self) -> CargoResult<String>
Gets the field workspace.package.license
.
sourcepub fn publish(&self) -> CargoResult<VecStringOrBool>
pub fn publish(&self) -> CargoResult<VecStringOrBool>
Gets the field workspace.package.publish
.
sourcepub fn repository(&self) -> CargoResult<String>
pub fn repository(&self) -> CargoResult<String>
Gets the field workspace.package.repository
.
sourcepub fn rust_version(&self) -> CargoResult<RustVersion>
pub fn rust_version(&self) -> CargoResult<RustVersion>
Gets the field workspace.package.rust-version
.
sourcepub fn version(&self) -> CargoResult<Version>
pub fn version(&self) -> CargoResult<Version>
Gets the field workspace.package.version
.
sourcepub fn get_dependency(
&self,
name: &str,
package_root: &Path
) -> CargoResult<TomlDependency>
pub fn get_dependency( &self, name: &str, package_root: &Path ) -> CargoResult<TomlDependency>
Gets a workspace dependency with the name
.
sourcepub fn license_file(&self, package_root: &Path) -> CargoResult<String>
pub fn license_file(&self, package_root: &Path) -> CargoResult<String>
Gets the field workspace.package.license-file
.
sourcepub fn readme(&self, package_root: &Path) -> CargoResult<StringOrBool>
pub fn readme(&self, package_root: &Path) -> CargoResult<StringOrBool>
Gets the field workspace.package.readme
.
pub fn ws_root(&self) -> &PathBuf
pub fn update_deps(&mut self, deps: Option<BTreeMap<String, TomlDependency>>)
pub fn update_lints(&mut self, lints: Option<TomlLints>)
pub fn update_ws_path(&mut self, ws_root: PathBuf)
Trait Implementations§
source§impl Clone for InheritableFields
impl Clone for InheritableFields
source§fn clone(&self) -> InheritableFields
fn clone(&self) -> InheritableFields
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InheritableFields
impl Debug for InheritableFields
source§impl Default for InheritableFields
impl Default for InheritableFields
source§fn default() -> InheritableFields
fn default() -> InheritableFields
source§impl<'de> Deserialize<'de> for InheritableFields
impl<'de> Deserialize<'de> for InheritableFields
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Auto Trait Implementations§
impl RefUnwindSafe for InheritableFields
impl Send for InheritableFields
impl Sync for InheritableFields
impl Unpin for InheritableFields
impl UnwindSafe for InheritableFields
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 568 bytes