pub trait CargoTomlPublicApiMethods {
    // Required methods
    fn read() -> Self;
    fn package_name(&self) -> String;
    fn package_version(&self) -> String;
    fn package_authors_string(&self) -> String;
    fn package_author_name(&self) -> String;
    fn package_repository(&self) -> Option<String>;
    fn package_description(&self) -> Option<String>;
    fn package_homepage(&self) -> String;
    fn workspace_members(&self) -> Option<Vec<String>>;
    fn github_owner(&self) -> Option<String>;
    fn package_keywords(&self) -> Vec<String>;
}
Expand description

Trait with methods to read data from Cargo.toml

Required Methods§

source

fn read() -> Self

read Cargo.toml, for workspaces it is the Cargo.toml of the first member

source

fn package_name(&self) -> String

Cargo.toml package name

source

fn package_version(&self) -> String

Cargo.toml package version

source

fn package_authors_string(&self) -> String

Cargo.toml package authors as string

source

fn package_author_name(&self) -> String

Cargo.toml package authors as string without emails

source

fn package_repository(&self) -> Option<String>

Cargo.toml package repository

source

fn package_description(&self) -> Option<String>

Cargo.toml package description

source

fn package_homepage(&self) -> String

Cargo.toml package homepage

source

fn workspace_members(&self) -> Option<Vec<String>>

Cargo.toml workspace members

source

fn github_owner(&self) -> Option<String>

GitHub owner from package.repository

source

fn package_keywords(&self) -> Vec<String>

Cargo.toml package keywords

Object Safety§

This trait is not object safe.

Implementors§