[][src]Struct wasm_pack::manifest::CrateData

pub struct CrateData { /* fields omitted */ }

Store for metadata learned about a crate

Methods

impl CrateData
[src]

pub fn new(crate_path: &Path) -> Result<CrateData, Error>
[src]

Reads all metadata for the crate whose manifest is inside the directory specified by path.

pub fn parse_crate_data(
    manifest_path: &Path
) -> Result<ManifestAndUnsedKeys, Error>
[src]

Read the manifest_path file and deserializes it using the toml Deserializer. Returns a Result containing ManifestAndUnsedKeys which contains CargoManifest and a BTreeSet<String> containing the unused keys from the parsed file.

Errors

Will return Err if the file (manifest_path) couldn't be read or if deserialize to CargoManifest fails.

pub fn warn_for_unused_keys(manifest_and_keys: &ManifestAndUnsedKeys)
[src]

Iterating through all the passed unused_keys and output a warning for each unknown key.

pub fn configured_profile(&self, profile: BuildProfile) -> &CargoWasmPackProfile
[src]

Get the configured profile.

pub fn check_crate_config(&self, step: &Step) -> Result<(), Error>
[src]

Check that the crate the given path is properly configured.

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

Get the crate name for the crate at the given path.

pub fn crate_license(&self) -> &Option<String>
[src]

Get the license for the crate at the given path.

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

Returns the path to this project's target directory where artifacts are located after a cargo build.

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

Returns the path to this project's root cargo workspace directory

pub fn write_package_json(
    &self,
    out_dir: &Path,
    scope: &Option<String>,
    disable_dts: bool,
    target: &str,
    step: &Step
) -> Result<(), Error>
[src]

Generate a package.json file inside in ./pkg.

Auto Trait Implementations

impl Send for CrateData

impl Sync for CrateData

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

πŸ”¬ This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

πŸ”¬ This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> Erased for T