Type Alias FnPointer

Source
pub type FnPointer = FnPointer<Interner>;

Aliased Type§

struct FnPointer {
    pub num_binders: usize,
    pub sig: FnSig<Interner>,
    pub substitution: FnSubst<Interner>,
}

Fields§

§num_binders: usize§sig: FnSig<Interner>§substitution: FnSubst<Interner>

Implementations

§

impl<I> FnPointer<I>
where I: Interner,

pub fn into_binders(self, interner: I) -> Binders<FnSubst<I>>

Represent the current Fn as if it was wrapped in Binders

pub fn as_binders(&self, interner: I) -> Binders<&FnSubst<I>>

Represent the current Fn as if it was wrapped in Binders

Trait Implementations

§

impl<I> Clone for FnPointer<I>
where I: Clone + Interner,

§

fn clone(&self) -> FnPointer<I>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<I> Debug for FnPointer<I>
where I: Interner,

§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<I> HasInterner for FnPointer<I>
where I: Interner,

§

type Interner = I

The interner associated with the type.
§

impl<I> Hash for FnPointer<I>
where I: Hash + Interner,

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl<I> PartialEq for FnPointer<I>
where I: PartialEq + Interner,

§

fn eq(&self, other: &FnPointer<I>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<I> TypeFoldable<I> for FnPointer<I>
where I: Interner,

§

fn try_fold_with<E>( self, folder: &mut dyn FallibleTypeFolder<I, Error = E>, outer_binder: DebruijnIndex, ) -> Result<FnPointer<I>, E>

Apply the given folder folder to self; binders is the number of binders that are in scope when beginning the folder. Typically binders starts as 0, but is adjusted when we encounter Binders<T> in the IR or other similar constructs.
§

fn fold_with( self, folder: &mut dyn TypeFolder<I, Error = Infallible>, outer_binder: DebruijnIndex, ) -> Self

A convenient alternative to try_fold_with for use with infallible folders. Do not override this method, to ensure coherence with try_fold_with.
§

impl<I> TypeVisitable<I> for FnPointer<I>
where I: Interner,

§

fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>

Apply the given visitor visitor to self; binders is the number of binders that are in scope when beginning the visitor. Typically binders starts as 0, but is adjusted when we encounter Binders<T> in the IR or other similar constructs.
§

impl<I> Copy for FnPointer<I>
where I: Interner, <I as Interner>::InternedSubstitution: Copy,

§

impl<I> Eq for FnPointer<I>
where I: Eq + Interner,

§

impl<I> StructuralPartialEq for FnPointer<I>
where I: Interner,