Enum macrohelper::Ty []

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),
    ObjectSum(Box<Ty>, Vec<TyParamBound>),
    PolyTraitRef(Vec<TyParamBound>),
    ImplTrait(Vec<TyParamBound>),
    Paren(Box<Ty>),
    Infer,
}

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

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 Debug for Ty

Formats the value using the given formatter.

impl ToTokens for Ty

impl PartialEq<Ty> for Ty

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

This method tests for !=.

impl Clone for Ty

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Ty