pub struct DnaBundle(_);
Expand description

A bundle of Wasm zomes, respresented as a file.

Implementations

Constructor

Convert to a DnaFile, and return what the hash of the Dna would have been without the provided modifier overrides

Construct from raw bytes

Read from a bundle file

Convert to a DnaDef

Build a bundle from a DnaFile. Useful for tests.

Methods from Deref<Target = Bundle<ValidatedDnaManifest>>

Accessor for the Manifest

Write a Bundle to a file

Retrieve the bytes for a resource at a Location, downloading it if necessary

Return the full set of resources specified by this bundle’s manifest. References to bundled resources can be returned directly, while all others will be fetched from the filesystem or the network.

Resolve all resources, but with fully owned references

Access the map of resources included in this bundle Bundled resources are also accessible via resolve or resolve_all, but using this method prevents a Clone

An arbitrary and opaque encoding of the bundle data into a byte array

Given that the Manifest is located at the given absolute path, find the absolute root directory for the “unpacked” Bundle directory. Useful when “imploding” a directory into a bundle to determine the default location of the generated Bundle file.

This will only be different than the Manifest path itself if the Manifest::path impl specifies a nested path.

Will return None if the path does not actually end with the manifest relative path, meaning that either the manifest file is misplaced within the unpacked directory, or an incorrect path was supplied.

Create a directory which contains the manifest as a YAML file, and each resource written to its own file (as raw bytes) The paths of the resources are specified by the paths of the bundle, and the path of the manifest file is specified by the Manifest::path trait method implementation of the M type.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.
Immutably borrows from an owned value. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more
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.
The type returned in the event of a conversion error.
Performs the conversion.

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
Compare self to key and return true if they are equal.

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