Enum syntex_syntax::ast::TyKind [] [src]

pub enum TyKind {
    Slice(P<Ty>),
    Array(P<Ty>, P<Expr>),
    Ptr(MutTy),
    Rptr(Option<Lifetime>, MutTy),
    BareFn(P<BareFnTy>),
    Never,
    Tup(Vec<P<Ty>>),
    Path(Option<QSelf>, Path),
    ObjectSum(P<Ty>, TyParamBounds),
    PolyTraitRef(TyParamBounds),
    ImplTrait(TyParamBounds),
    Paren(P<Ty>),
    Typeof(P<Expr>),
    Infer,
    ImplicitSelf,
    Mac(Mac),
}

The different kinds of types recognized by the compiler

Variants

A variable-length slice ([T])

A fixed length array ([T; n])

A raw pointer (*const T or *mut T)

A reference (&'a T or &'a mut T)

A bare function (e.g. fn(usize) -> bool)

The never type (!)

A tuple ((A, B, C, D,...))

A path (module::module::...::Type), optionally "qualified", e.g. <Vec<T> as SomeTrait>::SomeType.

Type parameters are stored in the Path itself

Something like A+B. Note that B must always be a path.

A type like for<'a> Foo<&'a Bar>

An impl TraitA+TraitB type.

No-op; kept solely so that we can pretty-print faithfully

Unused for now

TyKind::Infer means the type should be inferred instead of it having been specified. This can appear anywhere in a type.

Inferred type of a self or &self argument in a method.

Trait Implementations

impl Clone for TyKind
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for TyKind
[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 TyKind
[src]

impl Encodable for TyKind
[src]

Serialize a value using an Encoder.

impl Decodable for TyKind
[src]

Deserialize a value using a Decoder.

impl Hash for TyKind
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl Debug for TyKind
[src]

Formats the value using the given formatter.