Struct maturin::Metadata21
source · [−]pub struct Metadata21 {Show 27 fields
pub metadata_version: String,
pub name: String,
pub version: String,
pub platform: Vec<String>,
pub supported_platform: Vec<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub description_content_type: Option<String>,
pub keywords: Option<String>,
pub home_page: Option<String>,
pub download_url: Option<String>,
pub author: Option<String>,
pub author_email: Option<String>,
pub maintainer: Option<String>,
pub maintainer_email: Option<String>,
pub license: Option<String>,
pub classifiers: Vec<String>,
pub requires_dist: Vec<String>,
pub provides_dist: Vec<String>,
pub obsoletes_dist: Vec<String>,
pub requires_python: Option<String>,
pub requires_external: Vec<String>,
pub project_url: HashMap<String, String>,
pub provides_extra: Vec<String>,
pub scripts: HashMap<String, String>,
pub gui_scripts: HashMap<String, String>,
pub entry_points: HashMap<String, HashMap<String, String>>,
}
Expand description
Python Package Metadata 2.1 as specified in https://packaging.python.org/specifications/core-metadata/
Fields
metadata_version: String
name: String
version: String
platform: Vec<String>
supported_platform: Vec<String>
summary: Option<String>
description: Option<String>
description_content_type: Option<String>
keywords: Option<String>
home_page: Option<String>
download_url: Option<String>
maintainer: Option<String>
maintainer_email: Option<String>
license: Option<String>
classifiers: Vec<String>
requires_dist: Vec<String>
provides_dist: Vec<String>
obsoletes_dist: Vec<String>
requires_python: Option<String>
requires_external: Vec<String>
project_url: HashMap<String, String>
provides_extra: Vec<String>
scripts: HashMap<String, String>
gui_scripts: HashMap<String, String>
entry_points: HashMap<String, HashMap<String, String>>
Implementations
sourceimpl Metadata21
impl Metadata21
sourcepub fn from_cargo_toml(
cargo_toml: &CargoToml,
manifest_path: impl AsRef<Path>
) -> Result<Metadata21>
pub fn from_cargo_toml(
cargo_toml: &CargoToml,
manifest_path: impl AsRef<Path>
) -> Result<Metadata21>
Uses a Cargo.toml to create the metadata for python packages
manifest_path must be the directory, not the file
sourcepub fn to_vec(&self) -> Vec<(String, String)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn to_vec(&self) -> Vec<(String, String)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Formats the metadata into a list where keys with multiple values become multiple single-valued key-value pairs. This format is needed for the pypi uploader and for the METADATA file inside wheels
sourcepub fn to_file_contents(&self) -> String
pub fn to_file_contents(&self) -> String
Writes the format for the metadata file inside wheels
sourcepub fn get_distribution_escaped(&self) -> String
pub fn get_distribution_escaped(&self) -> String
Returns the distribution name according to PEP 427, Section “Escaping and Unicode”
sourcepub fn get_version_escaped(&self) -> String
pub fn get_version_escaped(&self) -> String
Returns the version encoded according to PEP 427, Section “Escaping and Unicode”
sourcepub fn get_dist_info_dir(&self) -> PathBuf
pub fn get_dist_info_dir(&self) -> PathBuf
Returns the name of the .dist-info directory as defined in the wheel specification
Trait Implementations
sourceimpl Clone for Metadata21
impl Clone for Metadata21
sourcefn clone(&self) -> Metadata21
fn clone(&self) -> Metadata21
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Metadata21
impl Debug for Metadata21
sourceimpl<'de> Deserialize<'de> for Metadata21
impl<'de> Deserialize<'de> for Metadata21
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
sourceimpl PartialEq<Metadata21> for Metadata21
impl PartialEq<Metadata21> for Metadata21
sourcefn eq(&self, other: &Metadata21) -> bool
fn eq(&self, other: &Metadata21) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Metadata21) -> bool
fn ne(&self, other: &Metadata21) -> bool
This method tests for !=
.
sourceimpl Serialize for Metadata21
impl Serialize for Metadata21
impl Eq for Metadata21
impl StructuralEq for Metadata21
impl StructuralPartialEq for Metadata21
Auto Trait Implementations
impl RefUnwindSafe for Metadata21
impl Send for Metadata21
impl Sync for Metadata21
impl Unpin for Metadata21
impl UnwindSafe for Metadata21
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<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more