pub enum HcAppBundle {
    Init {
        path: PathBuf,
    },
    Pack {
        path: PathBuf,
        output: Option<PathBuf>,
    },
    Unpack {
        path: PathBuf,
        output: Option<PathBuf>,
        force: bool,
    },
}
Expand description

Work with Holochain hApp bundles

Variants

Init

Fields

path: PathBuf

The path to create the working directory

Create a new, empty Holochain app (hApp) working directory and create a new sample happ.yaml manifest inside.

Pack

Fields

path: PathBuf

The path to the working directory containing a happ.yaml manifest

output: Option<PathBuf>

Specify the output path for the packed bundle file

If not specified, the [name].happ bundle will be placed inside the provided working directory.

Pack into the [name].happ bundle according to the happ.yaml manifest, found inside the working directory. The [name] is taken from the name property of the manifest file.

e.g.:

$ hc app pack ./some/directory/foo

creates a file ./some/directory/foo/[name].happ, based on ./some/directory/foo/happ.yaml

Unpack

Fields

path: PathBuf

The path to the bundle to unpack

output: Option<PathBuf>

Specify the directory for the unpacked content

If not specified, the directory will be placed alongside the bundle file, with the same name as the bundle file name.

force: bool

Overwrite an existing directory, if one exists

Unpack parts of the .happ bundle file into a specific directory.

e.g.:

$ hc app unpack ./some/dir/my-app.happ

creates a new directory ./some/dir/my-app, containining a new happ.yaml manifest

Implementations

Run this command

Trait Implementations

Formats the value using the given formatter. Read more

Returns clap::App corresponding to the struct.

Builds the struct from clap::ArgMatches. It’s guaranteed to succeed if matches originates from an App generated by StructOpt::clap called on the same type, otherwise it must panic. Read more

Builds the struct from the command line arguments (std::env::args_os). Calls clap::Error::exit on failure, printing the error message and aborting the program. Read more

Builds the struct from the command line arguments (std::env::args_os). Unlike StructOpt::from_args, returns clap::Error on failure instead of aborting the program, so calling .exit is up to you. Read more

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more