Enum rustdoc::clean::TypeExperimental [-]  [+] [src]

pub enum Type {
    ResolvedPath {
        // some fields omitted
    },
    TyParamBinder(NodeId),
    Generic(DefId),
    Self(DefId),
    Primitive(PrimitiveType),
    Closure(Box<ClosureDecl>),
    Proc(Box<ClosureDecl>),
    BareFunction(Box<BareFunctionDecl>),
    Tuple(Vec<Type>),
    Vector(Box<Type>),
    FixedVector(Box<Type>, String),
    Bottom,
    Unique(Box<Type>),
    RawPointer(Mutability, Box<Type>),
    BorrowedRef {
        // some fields omitted
    },
}

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
RawPointer
BorrowedRef

Fields

Trait Implementations

impl Show for Type

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl PartialEq for Type

fn eq(&self, __arg_0: &Type) -> bool

fn ne(&self, __arg_0: &Type) -> bool

impl<__D: Decoder<__E>, __E> Decodable<__D, __E> for Type

fn decode(__arg_0: &mut __D) -> Result<Type, __E>

impl<__S: Encoder<__E>, __E> Encodable<__S, __E> for Type

fn encode(&self, __arg_0: &mut __S) -> Result<(), __E>

impl Clone for Type

fn clone(&self) -> Type

fn clone_from(&mut self, source: &Self)