Enum syn::Ty [] [src]

pub enum Ty {
    Slice(Box<Ty>),
    Array(Box<Ty>, ConstExpr),
    Ptr(Box<MutTy>),
    Rptr(Option<Lifetime>, Box<MutTy>),
    BareFn(Box<BareFnTy>),
    Never,
    Tup(Vec<Ty>),
    Path(Option<QSelf>, Path),
    TraitObject(Vec<TyParamBound>),
    ImplTrait(Vec<TyParamBound>),
    Paren(Box<Ty>),
    Infer,
    Mac(Mac),
}

The different kinds of types recognized by the compiler

Variants

A variable-length array ([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

A trait object type Bound1 + Bound2 + Bound3 where Bound is a trait or a lifetime.

An impl Bound1 + Bound2 + Bound3 type where Bound is a trait or a lifetime.

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

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

A macro in the type position.

Trait Implementations

impl ToTokens for Ty
[src]

Write self to the given Tokens. Read more

impl Debug for Ty
[src]

Formats the value using the given formatter.

impl Clone for Ty
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Ty
[src]

impl PartialEq for Ty
[src]

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

This method tests for !=.

impl Hash for Ty
[src]

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

Feeds a slice of this type into the state provided.