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

Work with Holochain DNA bundles

Variants

Init

Fields

path: PathBuf

The path to create the working directory

Create a new, empty Holochain DNA bundle working directory and create a new sample dna.yaml manifest inside. .

Pack

Fields

path: PathBuf

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

output: Option<PathBuf>

Specify the output path for the packed bundle file

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

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

e.g.:

$ hc dna pack ./some/directory/foo

creates a file ./some/directory/foo/[name].dna, based on ./some/directory/foo/dna.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 .dna bundle file into a specific directory.

e.g.:

$ hc dna unpack ./some/dir/my-dna.dna

creates a new directory ./some/dir/my-dna, containining a new dna.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
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Deserializes using the given deserializer

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
The type for metadata in pointers and references to Self.
Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
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