Struct cargo::util::toml::TomlPackage

source ·
pub struct TomlPackage {
Show 31 fields edition: Option<MaybeWorkspace<String>>, rust_version: Option<MaybeWorkspace<String>>, name: InternedString, version: MaybeWorkspace<Version>, authors: Option<MaybeWorkspace<Vec<String>>>, build: Option<StringOrBool>, metabuild: Option<StringOrVec>, default_target: Option<String>, forced_target: Option<String>, links: Option<String>, exclude: Option<MaybeWorkspace<Vec<String>>>, include: Option<MaybeWorkspace<Vec<String>>>, publish: Option<MaybeWorkspace<VecStringOrBool>>, workspace: Option<String>, im_a_teapot: Option<bool>, autobins: Option<bool>, autoexamples: Option<bool>, autotests: Option<bool>, autobenches: Option<bool>, default_run: Option<String>, description: Option<MaybeWorkspace<String>>, homepage: Option<MaybeWorkspace<String>>, documentation: Option<MaybeWorkspace<String>>, readme: Option<MaybeWorkspace<StringOrBool>>, keywords: Option<MaybeWorkspace<Vec<String>>>, categories: Option<MaybeWorkspace<Vec<String>>>, license: Option<MaybeWorkspace<String>>, license_file: Option<MaybeWorkspace<String>>, repository: Option<MaybeWorkspace<String>>, resolver: Option<String>, metadata: Option<Value>,
}
Expand description

Represents the package/project sections of a Cargo.toml.

Note that the order of the fields matters, since this is the order they are serialized to a TOML file. For example, you cannot have values after the field metadata, since it is a table and values cannot appear after tables.

Fields§

§edition: Option<MaybeWorkspace<String>>§rust_version: Option<MaybeWorkspace<String>>§name: InternedString§version: MaybeWorkspace<Version>§authors: Option<MaybeWorkspace<Vec<String>>>§build: Option<StringOrBool>§metabuild: Option<StringOrVec>§default_target: Option<String>§forced_target: Option<String>§links: Option<String>§exclude: Option<MaybeWorkspace<Vec<String>>>§include: Option<MaybeWorkspace<Vec<String>>>§publish: Option<MaybeWorkspace<VecStringOrBool>>§workspace: Option<String>§im_a_teapot: Option<bool>§autobins: Option<bool>§autoexamples: Option<bool>§autotests: Option<bool>§autobenches: Option<bool>§default_run: Option<String>§description: Option<MaybeWorkspace<String>>§homepage: Option<MaybeWorkspace<String>>§documentation: Option<MaybeWorkspace<String>>§readme: Option<MaybeWorkspace<StringOrBool>>§keywords: Option<MaybeWorkspace<Vec<String>>>§categories: Option<MaybeWorkspace<Vec<String>>>§license: Option<MaybeWorkspace<String>>§license_file: Option<MaybeWorkspace<String>>§repository: Option<MaybeWorkspace<String>>§resolver: Option<String>§metadata: Option<Value>

Implementations§

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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: 824 bytes