[−][src]Struct ra_ap_hir_ty::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]
db: &dyn HirDatabase,
def: impl Into<GenericDefId>
) -> SubstsBuilder
pub fn build_for_type_ctor(
db: &dyn HirDatabase,
type_ctor: TypeCtor
) -> SubstsBuilder
[src]
db: &dyn HirDatabase,
type_ctor: TypeCtor
) -> SubstsBuilder
Trait Implementations
impl Clone for Substs
[src]
impl Debug for Substs
[src]
impl Deref for Substs
[src]
impl Eq for Substs
[src]
impl Hash for Substs
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Substs> for Substs
[src]
impl StructuralEq for Substs
[src]
impl StructuralPartialEq for Substs
[src]
impl TypeWalk for Substs
[src]
fn walk(&self, f: &mut impl FnMut(&Ty))
[src]
fn walk_mut_binders(
&mut self,
f: &mut impl FnMut(&mut Ty, DebruijnIndex),
binders: DebruijnIndex
)
[src]
&mut self,
f: &mut impl FnMut(&mut Ty, DebruijnIndex),
binders: DebruijnIndex
)
fn walk_mut(&mut self, f: &mut impl FnMut(&mut Ty))
[src]
fn fold_binders(
self,
f: &mut impl FnMut(Ty, DebruijnIndex) -> Ty,
binders: DebruijnIndex
) -> Self where
Self: Sized,
[src]
self,
f: &mut impl FnMut(Ty, DebruijnIndex) -> Ty,
binders: DebruijnIndex
) -> Self where
Self: Sized,
fn fold(self, f: &mut impl FnMut(Ty) -> Ty) -> Self where
Self: Sized,
[src]
Self: Sized,
fn subst_bound_vars(self, substs: &Substs) -> Self where
Self: Sized,
[src]
Self: Sized,
fn subst_bound_vars_at_depth(
self,
substs: &Substs,
depth: DebruijnIndex
) -> Self where
Self: Sized,
[src]
self,
substs: &Substs,
depth: DebruijnIndex
) -> Self where
Self: Sized,
fn shift_bound_vars(self, n: DebruijnIndex) -> Self where
Self: Sized,
[src]
Self: Sized,
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]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Cast for T
[src]
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
[src]
Self: CastTo<U>,
U: HasInterner,
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,