pub struct PackageBuilder {Show 13 fields
name: Option<Option<String>>,
version: Option<Option<Version>>,
description: Option<Option<String>>,
license: Option<Option<String>>,
license_file: Option<Option<PathBuf>>,
readme: Option<Option<PathBuf>>,
repository: Option<Option<String>>,
homepage: Option<Option<String>>,
wasmer_extra_flags: Option<Option<String>>,
disable_command_rename: Option<bool>,
rename_commands_to_raw_command_name: Option<bool>,
entrypoint: Option<Option<String>>,
private: Option<bool>,
}
Expand description
Builder for Package
.
Fields§
§name: Option<Option<String>>
The package’s name in the form namespace/name
.
version: Option<Option<Version>>
The package’s version number.
description: Option<Option<String>>
A brief description of the package.
license: Option<Option<String>>
A SPDX license specifier for this package.
license_file: Option<Option<PathBuf>>
The location of the license file, useful for non-standard licenses
readme: Option<Option<PathBuf>>
The package’s README file.
repository: Option<Option<String>>
A URL pointing to the package’s source code.
homepage: Option<Option<String>>
The website used as the package’s homepage.
wasmer_extra_flags: Option<Option<String>>
§disable_command_rename: Option<bool>
§rename_commands_to_raw_command_name: Option<bool>
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<Option<String>>
The name of the command that should be used by wasmer run
by default.
private: Option<bool>
Mark this as a private package
Implementations§
Source§impl PackageBuilder
impl PackageBuilder
Sourcepub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The package’s name in the form namespace/name
.
Sourcepub fn version<VALUE: Into<Version>>(&mut self, value: VALUE) -> &mut Self
pub fn version<VALUE: Into<Version>>(&mut self, value: VALUE) -> &mut Self
The package’s version number.
Sourcepub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A brief description of the package.
Sourcepub fn license<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn license<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A SPDX license specifier for this package.
Sourcepub fn license_file<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
pub fn license_file<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
The location of the license file, useful for non-standard licenses
Sourcepub fn readme<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
pub fn readme<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
The package’s README file.
Sourcepub fn repository<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn repository<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A URL pointing to the package’s source code.
Sourcepub fn homepage<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn homepage<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The website used as the package’s homepage.
pub fn wasmer_extra_flags<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
pub fn disable_command_rename(&mut self, value: bool) -> &mut Self
Sourcepub fn rename_commands_to_raw_command_name(&mut self, value: bool) -> &mut Self
pub fn rename_commands_to_raw_command_name(&mut self, value: bool) -> &mut Self
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.
Sourcepub fn entrypoint<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn entrypoint<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The name of the command that should be used by wasmer run
by default.
Sourcepub fn build(&self) -> Result<Package, PackageBuilderError>
pub fn build(&self) -> Result<Package, PackageBuilderError>
Sourcefn create_empty() -> Self
fn create_empty() -> Self
Create an empty builder, with all fields set to None
or PhantomData
.
Trait Implementations§
Source§impl Clone for PackageBuilder
impl Clone for PackageBuilder
Source§fn clone(&self) -> PackageBuilder
fn clone(&self) -> PackageBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more