Enum rustdoc::clean::Type[][src]

pub enum Type {
    ResolvedPath {
        path: Path,
        typarams: Option<Vec<GenericBound>>,
        did: DefId,
        is_generic: bool,
    },
    Generic(String),
    Primitive(PrimitiveType),
    BareFunction(Box<BareFunctionDecl>),
    Tuple(Vec<Type>),
    Slice(Box<Type>),
    Array(Box<Type>, String),
    Never,
    Unique(Box<Type>),
    RawPointer(MutabilityBox<Type>),
    BorrowedRef {
        lifetime: Option<Lifetime>,
        mutability: Mutability,
        type_: Box<Type>,
    },
    QPath {
        name: String,
        self_type: Box<Type>,
        trait_: Box<Type>,
    },
    Infer,
    ImplTrait(Vec<GenericBound>),
}

A representation of a Type suitable for hyperlinking purposes. Ideally one can get the original type out of the AST/TyCtxt given one of these, if more information is needed. Most importantly it does not preserve mutability or boxes.

Variants

structs/enums/traits (most that'd be an hir::TyKind::Path)

Fields of ResolvedPath

true if is a T::Name path for associated types

For parameterized types, so the consumer of the JSON don't go looking for types which don't exist anywhere.

Primitives are the fixed-size numeric types (plus int/usize/float), char, arrays, slices, and tuples.

extern "ABI" fn

Fields of BorrowedRef

Fields of QPath

Methods

impl Type
[src]

Trait Implementations

impl<'tcx> Clean<Type> for ProjectionTy<'tcx>
[src]

impl Clean<Type> for TraitRef
[src]

impl Clone for Type
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Encodable for Type
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

impl Decodable for Type
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

impl PartialEq for Type
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Type
[src]

impl Debug for Type
[src]

Formats the value using the given formatter. Read more

impl Hash for Type
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl GetDefId for Type
[src]

impl Clean<Type> for Ty
[src]

impl<'tcx> Clean<Type> for Ty<'tcx>
[src]

impl Display for Type
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl !Send for Type

impl !Sync for Type