Struct daml_lf::PackageInfo
source · [−]pub struct PackageInfo {
pub package_id: String,
pub package_name: String,
pub version: Option<String>,
pub language_version: LanguageVersion,
}Expand description
Information about a DamlPackage.
Fields
package_id: Stringpackage_name: Stringversion: Option<String>language_version: LanguageVersionImplementations
sourceimpl PackageInfo
impl PackageInfo
pub fn new(
package_id: impl Into<String>,
package_name: impl Into<String>,
version: impl Into<Option<String>>,
language_version: LanguageVersion
) -> Self
sourcepub fn extract_from_dar(dar: &DarFile) -> DamlLfResult<Vec<Self>>
pub fn extract_from_dar(dar: &DarFile) -> DamlLfResult<Vec<Self>>
Extract extended information about the packages in a DarFile.
This is a relatively expensive operation as it involves creating a full DamlArchive representation of the
given DarFile.
This is useful when examining a DarFile which has been constructed from a collection of packages (i.e. dalf
files or packages downloaded from a ledger) which do not have metadata.
sourcepub fn extract_from_archive(archive: &DamlArchive<'_>) -> Vec<Self>
pub fn extract_from_archive(archive: &DamlArchive<'_>) -> Vec<Self>
Extract extended information about the packages in a DamlArchive.
sourcepub fn extract_from_package(package: &DamlPackage<'_>) -> Self
pub fn extract_from_package(package: &DamlPackage<'_>) -> Self
Extract extended information from a DamlPackage.
sourcepub fn find_from_archive<F>(archive: &DamlArchive<'_>, f: F) -> Option<Self> where
F: Fn(&DamlPackage<'_>) -> bool,
pub fn find_from_archive<F>(archive: &DamlArchive<'_>, f: F) -> Option<Self> where
F: Fn(&DamlPackage<'_>) -> bool,
Extract extended package information about the package which matches the predicate.
Trait Implementations
sourceimpl Clone for PackageInfo
impl Clone for PackageInfo
sourcefn clone(&self) -> PackageInfo
fn clone(&self) -> PackageInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for PackageInfo
impl Debug for PackageInfo
sourceimpl Hash for PackageInfo
impl Hash for PackageInfo
sourceimpl PartialEq<PackageInfo> for PackageInfo
impl PartialEq<PackageInfo> for PackageInfo
sourcefn eq(&self, other: &PackageInfo) -> bool
fn eq(&self, other: &PackageInfo) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &PackageInfo) -> bool
fn ne(&self, other: &PackageInfo) -> bool
This method tests for !=.
impl Eq for PackageInfo
impl StructuralEq for PackageInfo
impl StructuralPartialEq for PackageInfo
Auto Trait Implementations
impl RefUnwindSafe for PackageInfo
impl Send for PackageInfo
impl Sync for PackageInfo
impl Unpin for PackageInfo
impl UnwindSafe for PackageInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more