pub struct TypeExpr {
pub path: Option<Path>,
pub name: Ident,
pub args: Vec<TypeExpr>,
pub span: Span,
}Expand description
A named type: string, i32, User, and so on are all just names,
resolved later by the compiler’s resolver. A type may carry a module
path (m::User, shop::cart::Cart, spec 2.10, 3.1) and generic
arguments (Vec<i32>, Result<User, string>, nested freely, spec 2.6);
the parser only records them, and the resolver checks that the path,
the name, and the argument count exist.
Fields§
§path: Option<Path>§name: Ident§args: Vec<TypeExpr>§span: SpanImplementations§
Trait Implementations§
impl Eq for TypeExpr
impl StructuralPartialEq for TypeExpr
Auto Trait Implementations§
impl Freeze for TypeExpr
impl RefUnwindSafe for TypeExpr
impl Send for TypeExpr
impl Sync for TypeExpr
impl Unpin for TypeExpr
impl UnsafeUnpin 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