Enum rustc::hir::Ty_
[−]
[src]
pub enum Ty_ {
TySlice(P<Ty>),
TyArray(P<Ty>, BodyId),
TyPtr(MutTy),
TyRptr(Lifetime, MutTy),
TyBareFn(P<BareFnTy>),
TyNever,
TyTup(HirVec<P<Ty>>),
TyPath(QPath),
TyTraitObject(HirVec<PolyTraitRef>, Lifetime),
TyImplTrait(TyParamBounds),
TyTypeof(BodyId),
TyInfer,
}rustc_private)The different kinds of types recognized by the compiler
Variants
TySlice(P<Ty>)rustc_private)A variable length slice ([T])
TyArray(P<Ty>, BodyId)rustc_private)A fixed length array ([T; n])
TyPtr(MutTy)rustc_private)A raw pointer (*const T or *mut T)
TyRptr(Lifetime, MutTy)rustc_private)A reference (&'a T or &'a mut T)
TyBareFn(P<BareFnTy>)rustc_private)A bare function (e.g. fn(usize) -> bool)
TyNeverrustc_private)The never type (!)
TyTup(HirVec<P<Ty>>)rustc_private)A tuple ((A, B, C, D,...))
TyPath(QPath)rustc_private)A path to a type definition (module::module::...::Type), or an
associated type, e.g. <Vec<T> as Trait>::Type or <T>::Target.
Type parameters may be stored in each PathSegment.
TyTraitObject(HirVec<PolyTraitRef>, Lifetime)rustc_private)A trait object type Bound1 + Bound2 + Bound3
where Bound is a trait or a lifetime.
TyImplTrait(TyParamBounds)rustc_private)An impl Bound1 + Bound2 + Bound3 type
where Bound is a trait or a lifetime.
TyTypeof(BodyId)rustc_private)Unused for now
TyInferrustc_private)TyInfer means the type should be inferred instead of it having been specified. This can appear anywhere in a type.
Trait Implementations
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 PartialEq for Ty_[src]
fn eq(&self, __arg_0: &Ty_) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Ty_) -> bool
This method tests for !=.
impl Eq for Ty_[src]
impl Encodable for Ty_[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
🔬 This is a nightly-only experimental API. (rustc_private)
deprecated in favor of rustc-serialize on crates.io
impl Decodable for Ty_[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Ty_, __D::Error>
🔬 This is a nightly-only experimental API. (rustc_private)
deprecated in favor of rustc-serialize on crates.io
impl Hash for Ty_[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.