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: String§package_name: String§version: Option<String>§language_version: LanguageVersionImplementations§
Source§impl 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>
pub fn find_from_archive<F>(archive: &DamlArchive<'_>, f: F) -> Option<Self>
Extract extended package information about the package which matches the predicate.
Trait Implementations§
Source§impl Clone for PackageInfo
impl Clone for PackageInfo
Source§fn clone(&self) -> PackageInfo
fn clone(&self) -> PackageInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackageInfo
impl Debug for PackageInfo
Source§impl Hash for PackageInfo
impl Hash for PackageInfo
Source§impl PartialEq for PackageInfo
impl PartialEq for PackageInfo
impl Eq for PackageInfo
impl StructuralPartialEq for PackageInfo
Auto Trait Implementations§
impl Freeze for PackageInfo
impl RefUnwindSafe for PackageInfo
impl Send for PackageInfo
impl Sync for PackageInfo
impl Unpin for PackageInfo
impl UnwindSafe for PackageInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more