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 qualifier.
Struct(DamlStruct<'a>)
A struct type.
Syn(DamlSyn<'a>)
A type synonym.
Implementations§
Source§impl<'a> DamlType<'a>
impl<'a> DamlType<'a>
pub fn name(&self) -> &str
Sourcepub fn contains_type_var(&self, type_var: &str) -> bool
pub fn contains_type_var(&self, type_var: &str) -> bool
Returns true if this DamlType contain a reference to type_var, false otherwise.
Trait Implementations§
Source§impl<'a> DamlVisitableElement<'a> for DamlType<'a>
impl<'a> DamlVisitableElement<'a> for DamlType<'a>
fn accept(&'a self, visitor: &'a mut impl DamlElementVisitor)
Source§impl<'a> IntoBoundedStatic for DamlType<'a>
impl<'a> IntoBoundedStatic for DamlType<'a>
Auto Trait Implementations§
impl<'a> Freeze for DamlType<'a>
impl<'a> RefUnwindSafe for DamlType<'a>
impl<'a> Send for DamlType<'a>
impl<'a> Sync for DamlType<'a>
impl<'a> Unpin for DamlType<'a>
impl<'a> UnwindSafe for DamlType<'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