Struct wasmer_cli::commands::app::create::CmdAppCreate
source · pub struct CmdAppCreate {Show 15 fields
pub template: Option<String>,
pub package: Option<String>,
pub use_local_manifest: bool,
pub deploy_app: bool,
pub no_validate: bool,
pub non_interactive: bool,
pub offline: bool,
pub owner: Option<String>,
pub app_name: Option<String>,
pub app_dir_path: Option<PathBuf>,
pub no_wait: bool,
pub env: WasmerEnv,
pub fmt: ItemFormatOpts,
pub new_package_name: Option<String>,
pub quiet: bool,
}
Expand description
Create a new Edge app.
Fields§
§template: Option<String>
A reference to the template to use.
It can be either an URL to a github repository - like
https://github.com/wasmer-examples/php-wasmer-starter
- or the name of a template that
will be searched for in the selected registry, like astro-starter
.
package: Option<String>
Name of the package to use.
use_local_manifest: bool
Whether or not to search (and use) a local manifest.
deploy_app: bool
Whether or not to deploy the application once it is created.
If selected, this might entail the step of publishing the package related to the application. By default, the application is not deployed and the package is not published.
no_validate: bool
Skip local schema validation.
non_interactive: bool
Do not prompt for user input.
offline: bool
Do not interact with any APIs.
owner: Option<String>
The owner of the app.
app_name: Option<String>
The name of the app (can be changed later)
app_dir_path: Option<PathBuf>
The path to the directory where the config file for the application will be written to.
no_wait: bool
Do not wait for the app to become reachable if deployed.
env: WasmerEnv
§fmt: ItemFormatOpts
§new_package_name: Option<String>
Name to use when creating a new package from a template.
quiet: bool
Don’t print any message.
Implementations§
source§impl CmdAppCreate
impl CmdAppCreate
fn get_app_config(&self, owner: &str, name: &str, package: &str) -> AppConfigV1
async fn get_app_name(&self) -> Result<String>
async fn get_owner(&self, client: Option<&WasmerClient>) -> Result<String>
async fn get_output_dir(&self, app_name: &str) -> Result<PathBuf>
async fn create_from_local_manifest( &self, owner: &str, app_name: &str, ) -> Result<bool>
async fn create_from_package( &self, client: Option<&WasmerClient>, owner: &str, app_name: &str, ) -> Result<bool>
fn persist_in_cache<S: Serialize>(path: &Path, data: &S) -> Result<(), Error>
sourceasync fn fetch_templates_cached(
client: &WasmerClient,
cache_dir: &Path,
language: &str,
) -> Result<Vec<AppTemplate>, Error>
async fn fetch_templates_cached( client: &WasmerClient, cache_dir: &Path, language: &str, ) -> Result<Vec<AppTemplate>, Error>
Tries to retrieve templates from a local file cache. Fetches the templates from the backend if the file doesn’t exist, can’t be loaded, or is older then the max age,
sourcefn load_cached<D: DeserializeOwned>(path: &Path) -> Result<(D, Duration), Error>
fn load_cached<D: DeserializeOwned>(path: &Path) -> Result<(D, Duration), Error>
Load cached data from a file.
Returns an error if the cache file is older than the max age.
async fn fetch_template_languages_cached( client: &WasmerClient, cache_dir: &Path, ) -> Result<Vec<TemplateLanguage>>
async fn get_template_url(&self, client: &WasmerClient) -> Result<Url>
async fn create_from_template( &self, client: Option<&WasmerClient>, owner: &str, app_name: &str, ) -> Result<bool>
async fn try_deploy( &self, owner: &str, app_name: &str, path: Option<&Path>, ) -> Result<()>
Trait Implementations§
source§impl Args for CmdAppCreate
impl Args for CmdAppCreate
source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id
][crate::ArgGroup::id] for this set of argumentssource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
source§impl AsyncCliCommand for CmdAppCreate
impl AsyncCliCommand for CmdAppCreate
source§impl CommandFactory for CmdAppCreate
impl CommandFactory for CmdAppCreate
source§impl Debug for CmdAppCreate
impl Debug for CmdAppCreate
source§impl FromArgMatches for CmdAppCreate
impl FromArgMatches for CmdAppCreate
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.source§impl Parser for CmdAppCreate
impl Parser for CmdAppCreate
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for CmdAppCreate
impl RefUnwindSafe for CmdAppCreate
impl Send for CmdAppCreate
impl Sync for CmdAppCreate
impl Unpin for CmdAppCreate
impl UnwindSafe for CmdAppCreate
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more