#[non_exhaustive]pub struct Template {
pub name: String,
pub module_name: String,
pub package_id: String,
pub package_name: String,
pub fields: Vec<Field>,
pub choices: Vec<Choice>,
pub key: Option<DamlType>,
}Expand description
A template: its payload fields, its choices, and an optional contract key.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe template name (PascalCase) — also the Rust payload struct name.
module_name: StringThe Daml module the template is defined in, dotted (e.g. Splice.Amulet).
Part of the on-ledger template id.
package_id: StringThe id (hash) of the package the template is defined in. Pins the exact template version in an on-ledger template id.
package_name: StringThe Daml package name (e.g. splice-amulet), used for the
upgrade-friendly #<package-name> template-id form so the participant
resolves the vetted version under Smart Contract Upgrade.
fields: Vec<Field>The payload fields, in declaration order.
choices: Vec<Choice>The choices exercisable on a contract of this template.
key: Option<DamlType>The contract key type, if the template declares a key.
Implementations§
Trait Implementations§
impl Eq for Template
impl StructuralPartialEq for Template
Auto Trait Implementations§
impl Freeze for Template
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnsafeUnpin for Template
impl UnwindSafe for Template
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.