Enum unrest_tmp_syn::Ty
[−]
[src]
pub enum Ty { Slice(TySlice), Array(TyArray), Ptr(TyPtr), Rptr(TyRptr), BareFn(TyBareFn), Never(TyNever), Tup(TyTup), Path(TyPath), TraitObject(TyTraitObject), ImplTrait(TyImplTrait), Paren(TyParen), Group(TyGroup), Infer(TyInfer), Mac(Mac), }
The different kinds of types recognized by the compiler
Variants
Slice(TySlice)
A variable-length array ([T]
)
Array(TyArray)
A fixed length array ([T; n]
)
Ptr(TyPtr)
A raw pointer (*const T
or *mut T
)
Rptr(TyRptr)
A reference (&'a T
or &'a mut T
)
BareFn(TyBareFn)
A bare function (e.g. fn(usize) -> bool
)
Never(TyNever)
The never type (!
)
Tup(TyTup)
A tuple ((A, B, C, D, ...)
)
Path(TyPath)
A path (module::module::...::Type
), optionally
"qualified", e.g. <Vec<T> as SomeTrait>::SomeType
.
Type parameters are stored in the Path itself
TraitObject(TyTraitObject)
A trait object type Bound1 + Bound2 + Bound3
where Bound
is a trait or a lifetime.
ImplTrait(TyImplTrait)
An impl Bound1 + Bound2 + Bound3
type
where Bound
is a trait or a lifetime.
Paren(TyParen)
No-op; kept solely so that we can pretty-print faithfully
Group(TyGroup)
No-op: kept solely so that we can pretty-print faithfully
Infer(TyInfer)
TyKind::Infer means the type should be inferred instead of it having been specified. This can appear anywhere in a type.
Mac(Mac)
A macro in the type position.
Methods
impl Ty
[src]
fn without_plus(i: Cursor) -> PResult<Self>
Trait Implementations
impl Synom for Ty
[src]
impl Clone for Ty
[src]
fn clone(&self) -> Ty
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl From<TySlice> for Ty
[src]
impl From<TyArray> for Ty
[src]
impl From<TyPtr> for Ty
[src]
impl From<TyRptr> for Ty
[src]
impl From<TyBareFn> for Ty
[src]
impl From<TyNever> for Ty
[src]
impl From<TyTup> for Ty
[src]
impl From<TyPath> for Ty
[src]
impl From<TyTraitObject> for Ty
[src]
fn from(e: TyTraitObject) -> Ty
Performs the conversion.
impl From<TyImplTrait> for Ty
[src]
fn from(e: TyImplTrait) -> Ty
Performs the conversion.