Enum syn::Ty [] [src]

pub enum Ty {
    Vec(Box<Ty>),
    FixedLengthVec(Box<Ty>, usize),
    Ptr(Box<MutTy>),
    Rptr(Option<Lifetime>, Box<MutTy>),
    BareFn(Box<BareFnTy>),
    Never,
    Tup(Vec<Ty>),
    Path(Option<QSelf>, Path),
    ObjectSum(Box<Ty>, Vec<TyParamBound>),
    PolyTraitRef(Vec<TyParamBound>),
    ImplTrait(Vec<TyParamBound>),
    Paren(Box<Ty>),
    Infer,
}

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

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

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

Trait Implementations

impl ToTokens for Ty
[src]

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 !=.