pub struct TypeAnnotation {
pub colon: Token,
pub type_name: Token,
pub is_array: bool,
pub is_nullable: bool,
}Expand description
Represents a type annotation in the AST.
A type annotation consists of a colon and the type name.
Fields§
§colon: TokenThe token representing the colon (:) in the type annotation.
type_name: TokenThe token representing the type name.
is_array: boolIs this type an array?
is_nullable: boolIs nullable?
Implementations§
Trait Implementations§
Source§impl Clone for TypeAnnotation
impl Clone for TypeAnnotation
Source§fn clone(&self) -> TypeAnnotation
fn clone(&self) -> TypeAnnotation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypeAnnotation
impl Debug for TypeAnnotation
Source§impl GetSpan for TypeAnnotation
impl GetSpan for TypeAnnotation
Source§impl PartialEq for TypeAnnotation
impl PartialEq for TypeAnnotation
impl StructuralPartialEq for TypeAnnotation
Auto Trait Implementations§
impl Freeze for TypeAnnotation
impl RefUnwindSafe for TypeAnnotation
impl Send for TypeAnnotation
impl Sync for TypeAnnotation
impl Unpin for TypeAnnotation
impl UnwindSafe for TypeAnnotation
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