canton-daml 0.2.3

Runtime types and Value codecs for canton-codegen-generated Daml bindings.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! The `Choice` trait that generated choice-argument types implement.

/// A choice exercisable on a contract of template `T`.
///
/// Generated code implements this on each choice's argument type, linking it to
/// the template it belongs to, the value the choice returns, and its on-ledger
/// name and consuming flag.
pub trait Choice<T> {
    /// The type the choice returns.
    type Return;
    /// The choice name as it appears on the ledger.
    const NAME: &'static str;
    /// Whether exercising the choice archives the contract.
    const CONSUMING: bool;
}