Enum rustdoc::clean::Type[src]
pub enum Type {
ResolvedPath {
pub path: Path,
pub typarams: Option<Vec<TyParamBound>>,
pub did: DefId,
},
TyParamBinder(NodeId),
Generic(DefId),
Self(DefId),
Primitive(Primitive),
Closure(Box<ClosureDecl>, Option<Lifetime>),
Proc(Box<ClosureDecl>),
BareFunction(Box<BareFunctionDecl>),
Tuple(Vec<Type>),
Vector(Box<Type>),
FixedVector(Box<Type>, String),
Bottom,
Unique(Box<Type>),
Managed(Box<Type>),
RawPointer(Mutability, Box<Type>),
BorrowedRef {
pub lifetime: Option<Lifetime>,
pub mutability: Mutability,
pub type_: Box<Type>,
},
}A representation of a Type suitable for hyperlinking purposes. Ideally one can get the original type out of the AST/ty::ctxt given one of these, if more information is needed. Most importantly it does not preserve mutability or boxes.
Variants
ResolvedPath | structs/enums/traits (anything that'd be an ast::TyPath) Fields
| ||||||
TyParamBinder | |||||||
Generic | For parameterized types, so the consumer of the JSON don't go looking for types which don't exist anywhere. | ||||||
Self | For references to self | ||||||
Primitive | Primitives are just the fixed-size numeric types (plus int/uint/float), and char. | ||||||
Closure | |||||||
Proc | |||||||
BareFunction | extern "ABI" fn | ||||||
Tuple | |||||||
Vector | |||||||
FixedVector | |||||||
Bottom | aka TyBot | ||||||
Unique | |||||||
Managed | |||||||
RawPointer | |||||||
BorrowedRef | Fields
|