wasmer_config::package

Struct PackageBuilder

Source
pub struct PackageBuilder { /* private fields */ }
Expand description

Builder for Package.

Implementations§

Source§

impl PackageBuilder

Source

pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn version<VALUE: Into<Version>>(&mut self, value: VALUE) -> &mut Self

The package’s version number.

Source

pub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

A brief description of the package.

Source

pub fn license<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

A SPDX license specifier for this package.

Source

pub fn license_file<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn readme<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self

The package’s README file.

Source

pub fn repository<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

A URL pointing to the package’s source code.

Source

pub fn homepage<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

The website used as the package’s homepage.

Source

pub fn wasmer_extra_flags<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Source

pub fn disable_command_rename(&mut self, value: bool) -> &mut Self

Source

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.

Source

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.

Source

pub fn private(&mut self, value: bool) -> &mut Self

Mark this as a private package

Source

pub fn build(&self) -> Result<Package, PackageBuilderError>

Builds a new Package.

§Errors

If a required field has not been initialized.

Source§

impl PackageBuilder

Source

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

Trait Implementations§

Source§

impl Clone for PackageBuilder

Source§

fn clone(&self) -> PackageBuilder

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 Default for PackageBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.