Struct daml_util::package::DamlPackages
source · [−]pub struct DamlPackages { /* private fields */ }Expand description
Convenience methods for working with a collection of DamlPackage.
Implementations
sourceimpl DamlPackages
impl DamlPackages
pub fn new(packages: Vec<DamlPackage>) -> Self
sourcepub async fn from_ledger(ledger_client: &DamlGrpcClient) -> DamlResult<Self>
pub async fn from_ledger(ledger_client: &DamlGrpcClient) -> DamlResult<Self>
Create a DamlPackages from all known DamlPackage on a Daml ledger.
sourcepub async fn find_module(self, module_name: &str) -> DamlResult<String>
pub async fn find_module(self, module_name: &str) -> DamlResult<String>
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.
sourcepub fn into_dar(
self,
auto_naming_style: ArchiveAutoNamingStyle
) -> DamlResult<DarFile>
pub fn into_dar(
self,
auto_naming_style: ArchiveAutoNamingStyle
) -> DamlResult<DarFile>
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
sourcepub fn into_archives(
self,
auto_naming_style: ArchiveAutoNamingStyle
) -> DamlResult<Vec<DamlLfArchive>>
pub fn into_archives(
self,
auto_naming_style: ArchiveAutoNamingStyle
) -> DamlResult<Vec<DamlLfArchive>>
Convert all contained DamlPackage into DamlLfArchive.
Note that the created archive is not named.
sourcepub fn into_payloads(self) -> DamlResult<Vec<(String, DamlLfArchivePayload)>>
pub fn into_payloads(self) -> DamlResult<Vec<(String, DamlLfArchivePayload)>>
Convert all contained DamlPackage into DamlLfArchivePayload.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DamlPackages
impl Send for DamlPackages
impl Sync for DamlPackages
impl Unpin for DamlPackages
impl UnwindSafe for DamlPackages
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcepub fn into_request(self) -> Request<T>
pub fn into_request(self) -> Request<T>
Wrap the input message T in a tonic::Request
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more