[−][src]Struct wasm_pack::manifest::CrateData
Store for metadata learned about a crate
Methods
impl CrateData
[src]
pub fn new(
crate_path: &Path,
out_name: Option<String>
) -> Result<CrateData, Error>
[src]
crate_path: &Path,
out_name: Option<String>
) -> Result<CrateData, Error>
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]
manifest_path: &Path
) -> Result<ManifestAndUnsedKeys, Error>
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) -> 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 name_prefix(&self) -> String
[src]
Get the prefix for output file names
pub fn crate_license(&self) -> &Option<String>
[src]
Get the license for the crate at the given path.
pub fn crate_license_file(&self) -> &Option<String>
[src]
Get the license file path 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: Target
) -> Result<(), Error>
[src]
&self,
out_dir: &Path,
scope: &Option<String>,
disable_dts: bool,
target: Target
) -> Result<(), Error>
Generate a package.json file inside in ./pkg
.
Auto Trait Implementations
impl RefUnwindSafe for CrateData
impl Send for CrateData
impl Sync for CrateData
impl Unpin for CrateData
impl UnwindSafe for CrateData
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,