Struct readme_sync::Manifest[][src]

pub struct Manifest {
    pub package: ManifestPackage,
    pub lib: Option<ManifestLibTarget>,
    pub bin: Option<Vec<ManifestBinTarget>>,
    pub features: Option<HashMap<String, HashSet<String>>>,
    pub dependencies: Option<HashMap<String, ManifestDependency>>,
    pub docs_meta: Option<ManifestDocsRsMetadata>,
}

Package manifest.

It includes only fields that are necessary for locating and parsing readme and library documentation.

See https://doc.rust-lang.org/cargo/reference/manifest.html for more details.

Fields

package: ManifestPackage

Defines a package.

lib: Option<ManifestLibTarget>

Library target settings.

bin: Option<Vec<ManifestBinTarget>>

Binary target settings.

features: Option<HashMap<String, HashSet<String>>>

Conditional compilation features.

dependencies: Option<HashMap<String, ManifestDependency>>

Package library dependencies.

docs_meta: Option<ManifestDocsRsMetadata>

Metadata that customize docs.rs builds.

Implementations

impl Manifest[src]

pub fn from_name_and_version(name: String, version: String) -> Self[src]

Creates simple manifest from package name and version.

pub fn from_cargo_toml_content(content: &str) -> Result<Self, TomlParseError>[src]

Creates manifest from Cargo.toml file contents.

pub fn from_cargo_toml_path(path: &Path) -> Result<Self, TomlReadError>[src]

Reads manifest from a specified file path.

pub fn from_package_path(path: &Path) -> Result<Self, TomlReadError>[src]

Reads manifest from the Cargo.toml file in the specified package path.

pub fn relative_readme_path(&self, root: &Path) -> Option<&Path>[src]

Returns package relative readme path.

pub fn default_readme_filename(root: &Path) -> Option<&'static Path>[src]

Returns package relative default readme path.

pub fn is_lib_documented_by_default(&self) -> bool[src]

Returns true if the package’s library is documented by default.

See https://doc.rust-lang.org/cargo/commands/cargo-doc.html for more details.

pub fn relative_lib_path(&self) -> &Path[src]

Returns package relative library file path.

See https://doc.rust-lang.org/cargo/commands/cargo-doc.html for more details.

pub fn default_relative_bin_path(&self) -> &'static Path[src]

Returns package relative default binary file path.

See https://doc.rust-lang.org/cargo/commands/cargo-doc.html for more details.

pub fn relative_bin_path(&self, name: &str) -> Result<PathBuf, BinPathError>[src]

Returns package relative binary file path by the specified binary target name.

See https://doc.rust-lang.org/cargo/commands/cargo-doc.html for more details.

pub fn default_relative_target_path(&self) -> &Path[src]

Returns package default library or binary target.

See https://doc.rust-lang.org/cargo/commands/cargo-doc.html for more details.

pub fn docs_rs_default_target(&self) -> &str[src]

Returns package target used for docs.rs builds.

See https://docs.rs/about/metadata for more details.

pub fn default_features(&self) -> HashSet<&str>[src]

Returns a default package features.

pub fn all_features(&self) -> HashSet<&str>[src]

Returns all package features.

pub fn docs_rs_features(&self) -> HashSet<&str>[src]

Returns package features used for docs.rs builds.

See https://docs.rs/about/metadata for more details.

Trait Implementations

impl Clone for Manifest[src]

impl Debug for Manifest[src]

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

impl Eq for Manifest[src]

impl PartialEq<Manifest> for Manifest[src]

impl StructuralEq for Manifest[src]

impl StructuralPartialEq for Manifest[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<T> From<T> for T[src]

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

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.