pub struct Package {Show 28 fields
pub name: Option<String>,
pub authors: Vec<String>,
pub version: Option<Inheritable<String>>,
pub edition: Option<Inheritable<Edition>>,
pub rust_version: Option<Inheritable<String>>,
pub build: Option<OptionalFile>,
pub workspace: Option<PathBuf>,
pub links: Option<String>,
pub description: Option<Inheritable<String>>,
pub homepage: Option<Inheritable<String>>,
pub documentation: Option<Inheritable<String>>,
pub readme: Option<Inheritable<OptionalFile>>,
pub keywords: Inheritable<BTreeSet<String>>,
pub categories: Inheritable<BTreeSet<String>>,
pub exclude: Inheritable<BTreeSet<String>>,
pub include: Inheritable<BTreeSet<String>>,
pub license: Option<Inheritable<String>>,
pub license_file: Option<Inheritable<PathBuf>>,
pub repository: Option<Inheritable<String>>,
pub default_run: Option<String>,
pub autobins: Option<bool>,
pub autolib: Option<bool>,
pub autoexamples: Option<bool>,
pub autotests: Option<bool>,
pub autobenches: Option<bool>,
pub publish: Option<Inheritable<Publish>>,
pub resolver: Option<Resolver>,
pub metadata: BTreeMap<String, Value>,
}Expand description
The [package] section of the Manifest. This is where crate properties are.
Fields§
§name: Option<String>The name of the crate.
Deprecated
version: Option<Inheritable<String>>Must parse as semver, e.g. “1.9.0”
edition: Option<Inheritable<Edition>>Package’s edition opt-in.
rust_version: Option<Inheritable<String>>MSRV 1.x (beware: does not require semver formatting)
build: Option<OptionalFile>Build script definition.
workspace: Option<PathBuf>Workspace this package is a member of (None if it’s implicit).
links: Option<String>Name of the native library the package links with.
description: Option<Inheritable<String>>A short blurb about the package. This is not rendered in any format when uploaded to crates.io (aka this is not markdown).
homepage: Option<Inheritable<String>>Project’s homepage.
documentation: Option<Inheritable<String>>Path to your custom docs. Unnecessary if you rely on docs.rs.
readme: Option<Inheritable<OptionalFile>>This points to a file under the package root (relative to this Cargo.toml).
implied if README.md, README.txt or README exists.
keywords: Inheritable<BTreeSet<String>>Up to 5, for search.
categories: Inheritable<BTreeSet<String>>This is a list of up to five categories where this crate would fit.
exclude: Inheritable<BTreeSet<String>>Don’t publish these files
include: Inheritable<BTreeSet<String>>Publish these files
license: Option<Inheritable<String>>e.g. “MIT”
license_file: Option<Inheritable<PathBuf>>If license is not standard
repository: Option<Inheritable<String>>(HTTPS) URL to crate’s repository
default_run: Option<String>The default binary to run by cargo run.
autobins: Option<bool>Discover binaries from the file system
autolib: Option<bool>Discover libraries from the file system
autoexamples: Option<bool>Discover examples from the file system
autotests: Option<bool>Discover tests from the file system
autobenches: Option<bool>Discover benchmarks from the file system
publish: Option<Inheritable<Publish>>Disable publishing or select custom registries.
resolver: Option<Resolver>The feature resolver version.
metadata: BTreeMap<String, Value>Arbitrary metadata of any type, an extension point for 3rd party tools.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Package
impl<'de> Deserialize<'de> for Package
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>,
impl Eq for Package
impl StructuralPartialEq for Package
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnsafeUnpin for Package
impl UnwindSafe for Package
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.