Struct wasmer_toml::Package

source ·
#[non_exhaustive]
pub struct Package {
Show 13 fields pub name: String, pub version: Version, pub description: String, pub license: Option<String>, pub license_file: Option<PathBuf>, pub readme: Option<PathBuf>, pub repository: Option<String>, pub homepage: Option<String>, pub wasmer_extra_flags: Option<String>, pub disable_command_rename: bool, pub rename_commands_to_raw_command_name: bool, pub entrypoint: Option<String>, pub private: bool,
}
Expand description

Metadata about the package.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

The package’s name in the form namespace/name.

§version: Version

The package’s version number.

§description: String

A brief description of the package.

§license: Option<String>

A SPDX license specifier for this package.

§license_file: Option<PathBuf>

The location of the license file, useful for non-standard licenses

§readme: Option<PathBuf>

The package’s README file.

§repository: Option<String>

A URL pointing to the package’s source code.

§homepage: Option<String>

The website used as the package’s homepage.

§wasmer_extra_flags: Option<String>
👎Deprecated since 0.9.2: Use runner-specific command attributes instead
§disable_command_rename: bool
👎Deprecated since 0.9.2: Does nothing. Prefer a runner-specific command attribute instead
§rename_commands_to_raw_command_name: bool
👎Deprecated since 0.9.2: Does nothing. Prefer a runner-specific command attribute instead

Unlike, disable-command-rename which prevents wasmer run <Module name>, this flag enables the command rename of wasmer run <COMMAND_NAME> into just <COMMAND_NAME>. This is useful for programs that need to inspect their argv[0] names and when the command name matches their executable name.

§entrypoint: Option<String>

The name of the command that should be used by wasmer run by default.

§private: bool

Mark this as a private package

Implementations§

source§

impl Package

source

pub fn builder( name: impl Into<String>, version: Version, description: impl Into<String> ) -> PackageBuilder

Create a PackageBuilder populated with all mandatory fields.

Trait Implementations§

source§

impl Clone for Package

source§

fn clone(&self) -> Package

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Package

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Package

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Package

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,