Struct maturin::Metadata21[][src]

pub struct Metadata21 {
    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>,
}

Python Package Metadata 2.1 as specified in https://packaging.python.org/specifications/core-metadata/

Fields

metadata_version: Stringname: Stringversion: Stringplatform: 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>author: Option<String>author_email: 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>

Implementations

impl Metadata21[src]

pub fn from_cargo_toml(
    cargo_toml: &CargoToml,
    manifest_path: impl AsRef<Path>
) -> Result<Metadata21>
[src]

Uses a Cargo.toml to create the metadata for python packages

manifest_path must be the directory, not the file

pub fn to_vec(&self) -> Vec<(String, String)>[src]

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

pub fn to_file_contents(&self) -> String[src]

Writes the format for the metadata file inside wheels

pub fn get_distribution_escaped(&self) -> String[src]

Returns the distribution name according to PEP 427, Section “Escaping and Unicode”

pub fn get_version_escaped(&self) -> String[src]

Returns the version encoded according to PEP 427, Section “Escaping and Unicode”

pub fn get_dist_info_dir(&self) -> PathBuf[src]

Returns the name of the .dist-info directory as defined in the wheel specification

Trait Implementations

impl Clone for Metadata21[src]

impl Debug for Metadata21[src]

impl<'de> Deserialize<'de> for Metadata21[src]

impl Eq for Metadata21[src]

impl PartialEq<Metadata21> for Metadata21[src]

impl Serialize for Metadata21[src]

impl StructuralEq for Metadata21[src]

impl StructuralPartialEq for Metadata21[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,