[][src]Struct ra_ap_hir_ty::Substs

pub struct Substs(_);

A list of substitutions for generic parameters.

Implementations

impl Substs[src]

pub fn empty() -> Substs[src]

pub fn single(ty: Ty) -> Substs[src]

pub fn prefix(&self, n: usize) -> Substs[src]

pub fn suffix(&self, n: usize) -> Substs[src]

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

pub fn type_params(db: &dyn HirDatabase, def: impl Into<GenericDefId>) -> Substs[src]

Return Substs that replace each parameter by itself (i.e. Ty::Param).

pub fn build_for_def(
    db: &dyn HirDatabase,
    def: impl Into<GenericDefId>
) -> SubstsBuilder
[src]

pub fn build_for_type_ctor(
    db: &dyn HirDatabase,
    type_ctor: TypeCtor
) -> SubstsBuilder
[src]

Trait Implementations

impl Clone for Substs[src]

impl Debug for Substs[src]

impl Deref for Substs[src]

type Target = [Ty]

The resulting type after dereferencing.

impl Eq for Substs[src]

impl Hash for Substs[src]

impl PartialEq<Substs> for Substs[src]

impl StructuralEq for Substs[src]

impl StructuralPartialEq for Substs[src]

impl TypeWalk for Substs[src]

Auto Trait Implementations

impl RefUnwindSafe for Substs

impl Send for Substs

impl Sync for Substs

impl Unpin for Substs

impl UnwindSafe for Substs

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: Clone + Any

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, 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.