[][src]Struct ra_ap_hir_ty::Binders

pub struct Binders<T> {
    pub num_binders: usize,
    pub value: T,
}

Fields

num_binders: usizevalue: T

Implementations

impl<T> Binders<T>[src]

pub fn new(num_binders: usize, value: T) -> Self[src]

pub fn as_ref(&self) -> Binders<&T>[src]

pub fn map<U>(self, f: impl FnOnce(T) -> U) -> Binders<U>[src]

pub fn filter_map<U>(self, f: impl FnOnce(T) -> Option<U>) -> Option<Binders<U>>[src]

impl<T: Clone, '_> Binders<&'_ T>[src]

pub fn cloned(&self) -> Binders<T>[src]

impl<T: TypeWalk> Binders<T>[src]

pub fn subst(self, subst: &Substs) -> T[src]

Substitutes all variables.

pub fn subst_prefix(self, subst: &Substs) -> Binders<T>[src]

Substitutes just a prefix of the variables (shifting the rest).

Trait Implementations

impl<T: Clone> Clone for Binders<T>[src]

impl<T: Copy> Copy for Binders<T>[src]

impl<T: Debug> Debug for Binders<T>[src]

impl<T: Eq> Eq for Binders<T>[src]

impl<T: Hash> Hash for Binders<T>[src]

impl<T: PartialEq> PartialEq<Binders<T>> for Binders<T>[src]

impl<T> StructuralEq for Binders<T>[src]

impl<T> StructuralPartialEq for Binders<T>[src]

impl<T: TypeWalk> TypeWalk for Binders<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Binders<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for Binders<T> where
    T: Send
[src]

impl<T> Sync for Binders<T> where
    T: Sync
[src]

impl<T> Unpin for Binders<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for Binders<T> where
    T: UnwindSafe
[src]

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