pub struct DamlArchive<'a> { /* private fields */ }Expand description
A Daml Archive.
Implementations§
Source§impl<'a> DamlArchive<'a>
impl<'a> DamlArchive<'a>
Sourcepub const fn new(
name: Cow<'a, str>,
main_package_id: Cow<'a, str>,
packages: HashMap<Cow<'a, str>, DamlPackage<'a>>,
) -> Self
pub const fn new( name: Cow<'a, str>, main_package_id: Cow<'a, str>, packages: HashMap<Cow<'a, str>, DamlPackage<'a>>, ) -> Self
pub fn name(&self) -> &str
Sourcepub fn main_package_id(&self) -> &str
pub fn main_package_id(&self) -> &str
Return the package id of the main DamlPackage contained in this DamlArchive.
Sourcepub fn packages(&self) -> impl Iterator<Item = &DamlPackage<'_>>
pub fn packages(&self) -> impl Iterator<Item = &DamlPackage<'_>>
Return an Iterator of the DamlPackage in this DamlArchive.
Sourcepub fn package_by_name(&self, name: &str) -> Option<&DamlPackage<'_>>
pub fn package_by_name(&self, name: &str) -> Option<&DamlPackage<'_>>
Return the first DamlPackage in this DamlArchive which has the given name or None if no such
package exists.
Sourcepub fn main_package(&self) -> Option<&DamlPackage<'_>>
pub fn main_package(&self) -> Option<&DamlPackage<'_>>
Return the main DamlPackage in this DamlArchive or None if no such package exists.
Sourcepub fn data_by_tycon<'b>(
&'a self,
tycon: &'b DamlTyCon<'_>,
) -> Option<&'a DamlData<'a>>
pub fn data_by_tycon<'b>( &'a self, tycon: &'b DamlTyCon<'_>, ) -> Option<&'a DamlData<'a>>
Retrieve a DamlData contained within this DamlArchive referred to by the supplied DamlTyCon or None if
not such data item exists.
DOCME
Sourcepub fn data_by_tycon_name<'b>(
&'a self,
tycon_name: &'b DamlTyConName<'_>,
) -> Option<&'a DamlData<'a>>
pub fn data_by_tycon_name<'b>( &'a self, tycon_name: &'b DamlTyConName<'_>, ) -> Option<&'a DamlData<'a>>
Retrieve a DamlData contained within this DamlArchive referred to by the supplied DamlTyConName or None
if not such data item exists.
DOCME
Sourcepub fn data<P, M, D>(
&'a self,
package_id: P,
module_path: &[M],
data_name: D,
) -> Option<&'a DamlData<'a>>
pub fn data<P, M, D>( &'a self, package_id: P, module_path: &[M], data_name: D, ) -> Option<&'a DamlData<'a>>
Retrieve a DamlData contained within this DamlArchive referred to by the supplied package id, module path &
name or None if not such data item exists.
DOCME
Sourcepub fn value_by_name<'b>(
&'a self,
name: &'b DamlValueName<'_>,
) -> Option<&'a DamlDefValue<'a>>
pub fn value_by_name<'b>( &'a self, name: &'b DamlValueName<'_>, ) -> Option<&'a DamlDefValue<'a>>
Retrieve a DamlDefValue for a given DamlValueName or None if no such value exists in this DamlArchive.
DOCME
Trait Implementations§
Source§impl<'a> Clone for DamlArchive<'a>
impl<'a> Clone for DamlArchive<'a>
Source§fn clone(&self) -> DamlArchive<'a>
fn clone(&self) -> DamlArchive<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> DamlVisitableElement<'a> for DamlArchive<'a>
impl<'a> DamlVisitableElement<'a> for DamlArchive<'a>
fn accept(&'a self, visitor: &'a mut impl DamlElementVisitor)
Source§impl<'a> Debug for DamlArchive<'a>
impl<'a> Debug for DamlArchive<'a>
Source§impl<'a> Default for DamlArchive<'a>
impl<'a> Default for DamlArchive<'a>
Source§fn default() -> DamlArchive<'a>
fn default() -> DamlArchive<'a>
Source§impl<'a> IntoBoundedStatic for DamlArchive<'a>
impl<'a> IntoBoundedStatic for DamlArchive<'a>
Source§type Static = DamlArchive<'static>
type Static = DamlArchive<'static>
'static lifetime.Source§fn into_static(self) -> Self::Static
fn into_static(self) -> Self::Static
T into an owned T such that T: 'static.Source§impl<'a> Serialize for DamlArchive<'a>
impl<'a> Serialize for DamlArchive<'a>
Source§impl<'a> ToBoundedStatic for DamlArchive<'a>
impl<'a> ToBoundedStatic for DamlArchive<'a>
Auto Trait Implementations§
impl<'a> Freeze for DamlArchive<'a>
impl<'a> RefUnwindSafe for DamlArchive<'a>
impl<'a> Send for DamlArchive<'a>
impl<'a> Sync for DamlArchive<'a>
impl<'a> Unpin for DamlArchive<'a>
impl<'a> UnwindSafe for DamlArchive<'a>
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
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>
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>
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