pub enum TypeExpr {
Named(Ident),
Set(Box<TypeExpr>, Span),
Seq(Box<TypeExpr>, Span),
Dict(Box<TypeExpr>, Box<TypeExpr>, Span),
Option(Box<TypeExpr>, Span),
Range(Box<Expr>, Box<Expr>, Span),
Tuple(Vec<TypeExpr>, Span),
}Expand description
A type expression.
Variants§
Named(Ident)
Named type (e.g., Nat, AccountId).
Set(Box<TypeExpr>, Span)
Set type Set[T].
Seq(Box<TypeExpr>, Span)
Sequence type Seq[T].
Dict(Box<TypeExpr>, Box<TypeExpr>, Span)
Dict type dict[K, V].
Option(Box<TypeExpr>, Span)
Option type Option[T].
Range(Box<Expr>, Box<Expr>, Span)
Range type lo..hi.
Tuple(Vec<TypeExpr>, Span)
Tuple type (T1, T2, ...).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeExpr
impl RefUnwindSafe for TypeExpr
impl Send for TypeExpr
impl Sync for TypeExpr
impl Unpin for TypeExpr
impl UnwindSafe for TypeExpr
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