pub struct Dar { /* private fields */ }Expand description
A parsed DAR: its manifest fields plus the raw bytes of each .dalf.
Implementations§
Source§impl Dar
impl Dar
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, DarError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, DarError>
Sourcepub fn sdk_version(&self) -> Option<&str>
pub fn sdk_version(&self) -> Option<&str>
The Daml SDK version the DAR was built with (manifest Sdk-Version).
Sourcepub fn main_package_bytes(&self) -> Result<&[u8], DarError>
pub fn main_package_bytes(&self) -> Result<&[u8], DarError>
Sourcepub fn package_paths(&self) -> impl Iterator<Item = &str>
pub fn package_paths(&self) -> impl Iterator<Item = &str>
The archive paths of every package (.dalf) in the DAR, main and
dependencies, in sorted order.
Sourcepub fn package_bytes(&self) -> impl Iterator<Item = &[u8]>
pub fn package_bytes(&self) -> impl Iterator<Item = &[u8]>
The raw Daml-LF bytes of every package in the DAR — the main package
and its full dependency closure (daml-prim, daml-stdlib, and any
other packages the DAR bundles). Decoding all of them gives the
PackageMap needed to resolve cross-package references.
Sourcepub fn package_entries(&self) -> impl Iterator<Item = (&str, &[u8])>
pub fn package_entries(&self) -> impl Iterator<Item = (&str, &[u8])>
Like Self::package_bytes, each package paired with its archive path
— so a decode failure can name the offending .dalf.
Sourcepub fn package_count(&self) -> usize
pub fn package_count(&self) -> usize
The number of packages (.dalf entries) in the DAR.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dar
impl RefUnwindSafe for Dar
impl Send for Dar
impl Sync for Dar
impl Unpin for Dar
impl UnsafeUnpin for Dar
impl UnwindSafe for Dar
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