pub struct DamlModule<'a> { /* private fields */ }Expand description
A Daml module.
Implementations§
Source§impl<'a> DamlModule<'a>
impl<'a> DamlModule<'a>
Sourcepub fn new_leaf(
path: Vec<Cow<'a, str>>,
flags: DamlFeatureFlags,
synonyms: Vec<DamlDefTypeSyn<'a>>,
data_types: HashMap<Cow<'a, str>, DamlData<'a>>,
values: HashMap<Cow<'a, str>, DamlDefValue<'a>>,
) -> Self
pub fn new_leaf( path: Vec<Cow<'a, str>>, flags: DamlFeatureFlags, synonyms: Vec<DamlDefTypeSyn<'a>>, data_types: HashMap<Cow<'a, str>, DamlData<'a>>, values: HashMap<Cow<'a, str>, DamlDefValue<'a>>, ) -> Self
Create a leaf DamlModule.
Sourcepub fn flags(&self) -> &DamlFeatureFlags
pub fn flags(&self) -> &DamlFeatureFlags
The DamlFeatureFlags of the module.
Sourcepub fn synonyms(&self) -> &[DamlDefTypeSyn<'_>]
pub fn synonyms(&self) -> &[DamlDefTypeSyn<'_>]
The DamlDefTypeSyn of the module.
Sourcepub fn child_modules(&self) -> impl Iterator<Item = &DamlModule<'a>>
pub fn child_modules(&self) -> impl Iterator<Item = &DamlModule<'a>>
The child DamlModule of the module.
Sourcepub fn data_types(&self) -> impl Iterator<Item = &DamlData<'a>>
pub fn data_types(&self) -> impl Iterator<Item = &DamlData<'a>>
The DamlData declared in the module.
Sourcepub fn values(&self) -> impl Iterator<Item = &DamlDefValue<'a>>
pub fn values(&self) -> impl Iterator<Item = &DamlDefValue<'a>>
The DamlDefValue declared in the module.
Sourcepub fn local_name(&self) -> &str
pub fn local_name(&self) -> &str
Returns the local name of the module.
Sourcepub fn child_module<S: AsRef<str>>(&self, name: S) -> Option<&DamlModule<'_>>
pub fn child_module<S: AsRef<str>>(&self, name: S) -> Option<&DamlModule<'_>>
Retrieve a child DamlModule by name or None if no such module exists.
Sourcepub fn child_module_path<'b, S: AsRef<str>>(
&'a self,
relative_path: &'b [S],
) -> Option<&'a DamlModule<'a>>
pub fn child_module_path<'b, S: AsRef<str>>( &'a self, relative_path: &'b [S], ) -> Option<&'a DamlModule<'a>>
Retrieve a child DamlModule by name or None if no such module exists.
Sourcepub fn data_type<S: AsRef<str>>(&self, name: S) -> Option<&DamlData<'a>>
pub fn data_type<S: AsRef<str>>(&self, name: S) -> Option<&DamlData<'a>>
Retrieve a DamlData by name or None if no such data type exists.
Sourcepub fn value<S: AsRef<str>>(&self, name: S) -> Option<&DamlDefValue<'a>>
pub fn value<S: AsRef<str>>(&self, name: S) -> Option<&DamlDefValue<'a>>
Retrieve a DamlDefValue by name or None if no such value exists.
Trait Implementations§
Source§impl<'a> Clone for DamlModule<'a>
impl<'a> Clone for DamlModule<'a>
Source§fn clone(&self) -> DamlModule<'a>
fn clone(&self) -> DamlModule<'a>
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<'a> DamlVisitableElement<'a> for DamlModule<'a>
impl<'a> DamlVisitableElement<'a> for DamlModule<'a>
fn accept(&'a self, visitor: &'a mut impl DamlElementVisitor)
Source§impl<'a> Debug for DamlModule<'a>
impl<'a> Debug for DamlModule<'a>
Source§impl<'a> IntoBoundedStatic for DamlModule<'a>
impl<'a> IntoBoundedStatic for DamlModule<'a>
Source§type Static = DamlModule<'static>
type Static = DamlModule<'static>
The target type is bounded by the
'static lifetime.Source§fn into_static(self) -> Self::Static
fn into_static(self) -> Self::Static
Convert an owned
T into an owned T such that T: 'static.Source§impl<'a> Serialize for DamlModule<'a>
impl<'a> Serialize for DamlModule<'a>
Source§impl<'a> ToBoundedStatic for DamlModule<'a>
impl<'a> ToBoundedStatic for DamlModule<'a>
Auto Trait Implementations§
impl<'a> Freeze for DamlModule<'a>
impl<'a> RefUnwindSafe for DamlModule<'a>
impl<'a> Send for DamlModule<'a>
impl<'a> Sync for DamlModule<'a>
impl<'a> Unpin for DamlModule<'a>
impl<'a> UnwindSafe for DamlModule<'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
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