Struct wasmer_config::package::PackageBuilder
source · 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 moreAuto Trait Implementations§
impl Freeze for PackageBuilder
impl RefUnwindSafe for PackageBuilder
impl Send for PackageBuilder
impl Sync for PackageBuilder
impl Unpin for PackageBuilder
impl UnwindSafe for PackageBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)