Struct mr_bundle::Bundle[][src]

pub struct Bundle<M> where
    M: Manifest
{ /* fields omitted */ }
Expand description

A Manifest bundled together, optionally, with the Resources that it describes. This is meant to be serialized for standalone distribution, and deserialized by the receiver.

The manifest may describe locations of resources not included in the Bundle.

Implementations

Creates a bundle containing a manifest and a collection of resources to be bundled together with the manifest.

The paths paired with each resource must correspond to the set of Location::Bundles specified in the Manifest::location(), or else this is not a valid bundle.

A base directory must also be supplied so that relative paths can be resolved into absolute ones.

Create a bundle, asserting that all paths in the Manifest are absolute.

Accessor for the Manifest

Return a new Bundle with an updated manifest, subject to the same validation constraints as creating a new Bundle from scratch.

Load a Bundle into memory from a file

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

Decode bytes produced by encode

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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

Compare self to key and return true if they are equal.

Performs the conversion.

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

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.

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