logo
pub enum DamlType<'a> {
Show 28 variants ContractId(Option<Box<DamlType<'a>>>), Int64, Numeric(Vec<DamlType<'a>>), Text, Timestamp, Party, Bool, Unit, Date, List(Vec<DamlType<'a>>), TextMap(Vec<DamlType<'a>>), GenMap(Vec<DamlType<'a>>), Optional(Vec<DamlType<'a>>), TyCon(DamlTyCon<'a>), BoxedTyCon(DamlTyCon<'a>), Var(DamlVar<'a>), Nat(u8), Arrow, Any, TypeRep, Bignumeric, RoundingMode, AnyException, Update, Scenario, Forall(DamlForall<'a>), Struct(DamlStruct<'a>), Syn(DamlSyn<'a>),
}
Expand description

A Daml type.

Variants

ContractId(Option<Box<DamlType<'a>>>)

Opaque contract identifier.

Int64

Signed 64 bit integer.

Numeric(Vec<DamlType<'a>>)

Fixed precision numeric.

Text

Unicode text data.

Timestamp

A date & time.

Party

A Daml Party.

Bool

A Boolean type.

Unit

A Unit type.

Date

A date.

List(Vec<DamlType<'a>>)

A list.

TextMap(Vec<DamlType<'a>>)

A map wih DamlType::Text keys.

GenMap(Vec<DamlType<'a>>)

A map.

Optional(Vec<DamlType<'a>>)

An optional value.

TyCon(DamlTyCon<'a>)

A type constructor.

BoxedTyCon(DamlTyCon<'a>)

A type constructor (heap allocated).

Var(DamlVar<'a>)

A type variable.

Nat(u8)

A natural number.

Arrow

A function.

Any

Any type.

TypeRep

A type rep.

Bignumeric

A big numeric.

RoundingMode

A rounding mode.

AnyException

An exception.

Update

An update effect.

Scenario

A scenario effect.

Forall(DamlForall<'a>)

Universal qualifiier.

Struct(DamlStruct<'a>)

A struct type.

Syn(DamlSyn<'a>)

A type synonym.

Implementations

Returns true if this DamlType contain a reference to type_var, false otherwise.

Convenience method to create a DamlType::TyCon for a given package id, module path and entity.

Convenience method to create a DamlType::TyCon for a given package id, module path, entity & type args.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The target type is bounded by the 'static lifetime.

Convert an owned T into an owned T such that T: 'static.

Serialize this value into the given Serde serializer. Read more

The target type is bounded by the 'static lifetime.

Convert an &T to an owned T such that T: 'static.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.