pub enum Type<'a> {
Show 19 variants
U8(SourceSpan),
S8(SourceSpan),
U16(SourceSpan),
S16(SourceSpan),
U32(SourceSpan),
S32(SourceSpan),
U64(SourceSpan),
S64(SourceSpan),
F32(SourceSpan),
F64(SourceSpan),
Char(SourceSpan),
Bool(SourceSpan),
String(SourceSpan),
Tuple(Vec<Type<'a>>, SourceSpan),
List(Box<Type<'a>>, SourceSpan),
Option(Box<Type<'a>>, SourceSpan),
Result {
ok: Option<Box<Type<'a>>>,
err: Option<Box<Type<'a>>>,
span: SourceSpan,
},
Borrow(Ident<'a>, SourceSpan),
Ident(Ident<'a>),
}
Expand description
Represents a type in the AST.
Variants§
U8(SourceSpan)
A u8
type.
S8(SourceSpan)
A s8
type.
U16(SourceSpan)
A u16
type.
S16(SourceSpan)
A s16
type.
U32(SourceSpan)
A u32
type.
S32(SourceSpan)
A s32
type.
U64(SourceSpan)
A u64
type.
S64(SourceSpan)
A s64
type.
F32(SourceSpan)
A f32
type.
F64(SourceSpan)
A f64
type.
Char(SourceSpan)
A char
type.
Bool(SourceSpan)
A bool
type.
String(SourceSpan)
A string
type.
Tuple(Vec<Type<'a>>, SourceSpan)
A tuple type.
List(Box<Type<'a>>, SourceSpan)
A list type.
Option(Box<Type<'a>>, SourceSpan)
An option type.
Result
A result type.
Fields
§
span: SourceSpan
The span of the result type.
Borrow(Ident<'a>, SourceSpan)
A borrow type.
Ident(Ident<'a>)
An identifier to a value type.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Type<'a>
impl<'a> RefUnwindSafe for Type<'a>
impl<'a> Send for Type<'a>
impl<'a> Sync for Type<'a>
impl<'a> Unpin for Type<'a>
impl<'a> UnwindSafe for Type<'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