logo
pub struct DamlPackages { /* private fields */ }
Expand description

Convenience methods for working with a collection of DamlPackage.

In the following example a DamlPackages is created from all known DamlPackage on a Daml ledger and then converted into DarFile using the ArchiveAutoNamingStyle::Uuid naming style:

futures::executor::block_on(async {
let ledger_client = DamlGrpcClientBuilder::uri("http://127.0.0.1").connect().await.unwrap();
let packages = DamlPackages::from_ledger(&ledger_client).await.unwrap();
let dar = packages.into_dar(ArchiveAutoNamingStyle::Uuid).unwrap();

Implementations

Create a DamlPackages from all known DamlPackage on a Daml ledger.

Return the hash of the DamlPackage which contains a given module or en error if no such package exists.

The supplied module_name name is assumed to be in DottedName format, i.e. TopModule.SubModule.Module.

Package all contained DamlPackage into a single DarFile.

Note that an arbitrary package is selected as the main and the remainder are the dependencies. No attempt is made to ensure that the dependencies do in fact depend on the main. TODO allow specifying the package id to use as the main package TODO allow filtering packages such that only actual dependencies of main are included

Convert all contained DamlPackage into DamlLfArchive.

Note that the created archive is not named.

Convert all contained DamlPackage into DamlLfArchivePayload.

Trait Implementations

Formats the value using the given formatter. 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.

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.

Wrap the input message T in a tonic::Request

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