#[non_exhaustive]pub struct Package<Metadata = Table> {Show 25 fields
pub name: Name,
pub version: Version,
pub authors: Vec<String>,
pub edition: Edition,
pub description: Option<String>,
pub documentation: Option<Url>,
pub readme: Option<PathBuf>,
pub homepage: Option<Url>,
pub repository: Option<Url>,
pub license: Option<License>,
pub license_file: Option<PathBuf>,
pub keywords: Vec<String>,
pub categories: Vec<Category>,
pub workspace: Option<PathBuf>,
pub build: Option<PathBuf>,
pub links: Option<String>,
pub exclude: Vec<Pattern>,
pub include: Vec<Pattern>,
pub publish: Publish,
pub metadata: Metadata,
pub default_run: Option<String>,
pub autobins: Option<bool>,
pub autoexamples: Option<bool>,
pub autotests: Option<bool>,
pub autobenches: Option<bool>,
/* private fields */
}
This is supported on crate features
serde
and toml
only.Expand description
[package]
— Defines a package.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: Name
version: Version
edition: Edition
description: Option<String>
documentation: Option<Url>
readme: Option<PathBuf>
homepage: Option<Url>
repository: Option<Url>
license: Option<License>
license_file: Option<PathBuf>
keywords: Vec<String>
categories: Vec<Category>
workspace: Option<PathBuf>
build: Option<PathBuf>
links: Option<String>
exclude: Vec<Pattern>
include: Vec<Pattern>
publish: Publish
metadata: Metadata
default_run: Option<String>
autobins: Option<bool>
autoexamples: Option<bool>
autotests: Option<bool>
autobenches: Option<bool>
Trait Implementations
sourceimpl<'de, Metadata> Deserialize<'de> for Package<Metadata> where
Metadata: Deserialize<'de>,
Metadata: Default,
impl<'de, Metadata> Deserialize<'de> for Package<Metadata> where
Metadata: Deserialize<'de>,
Metadata: Default,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<Metadata> RefUnwindSafe for Package<Metadata> where
Metadata: RefUnwindSafe,
impl<Metadata> Send for Package<Metadata> where
Metadata: Send,
impl<Metadata> Sync for Package<Metadata> where
Metadata: Sync,
impl<Metadata> Unpin for Package<Metadata> where
Metadata: Unpin,
impl<Metadata> UnwindSafe for Package<Metadata> where
Metadata: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more