Trait ToParameter

Source
pub trait ToParameter {
    // Required method
    fn to_parameter_at_depth<I: Interner>(
        &self,
        interner: &I,
        debruijn: DebruijnIndex,
    ) -> Parameter<I>;

    // Provided method
    fn to_parameter<I: Interner>(&self, interner: &I) -> Parameter<I> { ... }
}

Required Methods§

Source

fn to_parameter_at_depth<I: Interner>( &self, interner: &I, debruijn: DebruijnIndex, ) -> Parameter<I>

Provided Methods§

Source

fn to_parameter<I: Interner>(&self, interner: &I) -> Parameter<I>

Utility for converting a list of all the binders into scope into references to those binders. Simply pair the binders with the indices, and invoke to_parameter() on the (binder, index) pair. The result will be a reference to a bound variable of appropriate kind at the corresponding index.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> ToParameter for (&'a ParameterKind<()>, usize)

Source§

fn to_parameter_at_depth<I: Interner>( &self, interner: &I, debruijn: DebruijnIndex, ) -> Parameter<I>

Implementors§