Struct ra_ap_hir_ty::Ty[][src]

pub struct Ty(_);

Implementations

impl Ty[src]

pub fn def_crates(
    &self,
    db: &dyn HirDatabase,
    cur_crate: CrateId
) -> Option<ArrayVec<CrateId, 2>>
[src]

impl Ty[src]

pub fn kind(&self, _interner: &Interner) -> &TyKind[src]

pub fn interned_mut(&mut self) -> &mut TyKind[src]

pub fn into_inner(self) -> TyKind[src]

impl Ty[src]

pub fn as_reference(&self) -> Option<(&Ty, Mutability)>[src]

pub fn as_reference_or_ptr(&self) -> Option<(&Ty, Rawness, Mutability)>[src]

pub fn strip_references(&self) -> &Ty[src]

pub fn as_adt(&self) -> Option<(AdtId, &Substitution)>[src]

pub fn as_tuple(&self) -> Option<&Substitution>[src]

pub fn as_generic_def(&self, db: &dyn HirDatabase) -> Option<GenericDefId>[src]

pub fn is_never(&self) -> bool[src]

pub fn is_unknown(&self) -> bool[src]

pub fn equals_ctor(&self, other: &Ty) -> bool[src]

pub fn dyn_trait(&self) -> Option<TraitId>[src]

If this is a dyn Trait, returns that trait.

pub fn callable_def(&self, db: &dyn HirDatabase) -> Option<CallableDefId>[src]

pub fn as_fn_def(&self, db: &dyn HirDatabase) -> Option<FunctionId>[src]

pub fn callable_sig(&self, db: &dyn HirDatabase) -> Option<CallableSig>[src]

pub fn substs(&self) -> Option<&Substitution>[src]

Returns the type parameters of this type if it has some (i.e. is an ADT or function); so if self is Option<u32>, this returns the u32.

pub fn impl_trait_bounds(
    &self,
    db: &dyn HirDatabase
) -> Option<Vec<QuantifiedWhereClause>>
[src]

pub fn associated_type_parent_trait(
    &self,
    db: &dyn HirDatabase
) -> Option<TraitId>
[src]

Trait Implementations

impl CastTo<GenericArg> for Ty[src]

impl Clone for Ty[src]

impl Debug for Ty[src]

impl Eq for Ty[src]

impl HasInterner for Ty[src]

type Interner = Interner

The interner associated with the type.

impl Hash for Ty[src]

impl HirDisplay for Ty[src]

impl PartialEq<Ty> for Ty[src]

impl StructuralEq for Ty[src]

impl StructuralPartialEq for Ty[src]

impl TyExt for Ty[src]

impl TypeWalk for Ty[src]

Auto Trait Implementations

impl RefUnwindSafe for Ty

impl Send for Ty

impl Sync for Ty

impl Unpin for Ty

impl UnwindSafe for Ty

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Cast for T[src]

impl<T> CloneAny for T where
    T: Any + Clone

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.