Skip to main content

BoundTerm

Trait BoundTerm 

Source
pub trait BoundTerm<'db>:
    Update
    + Subst<'db, Output = Self>
    + Sized {
    type BoundTerm: BoundTerm<'db, LeafTerm = Self::LeafTerm>;
    type LeafTerm: Subst<'db, Output = Self::LeafTerm>;

    const BINDER_LEVELS: usize;

    // Required methods
    fn bind(
        db: &'db dyn Db,
        symbols_to_bind: &mut dyn Iterator<Item = Vec<SymVariable<'db>>>,
        leaf_value: Self::LeafTerm,
    ) -> Self;
    fn as_binder(
        &self,
    ) -> Result<&Binder<'db, Self::BoundTerm>, &Self::LeafTerm>;
}
Expand description

A value that can appear in a binder

Required Associated Constants§

Required Associated Types§

Source

type BoundTerm: BoundTerm<'db, LeafTerm = Self::LeafTerm>

Source

type LeafTerm: Subst<'db, Output = Self::LeafTerm>

Required Methods§

Source

fn bind( db: &'db dyn Db, symbols_to_bind: &mut dyn Iterator<Item = Vec<SymVariable<'db>>>, leaf_value: Self::LeafTerm, ) -> Self

Source

fn as_binder(&self) -> Result<&Binder<'db, Self::BoundTerm>, &Self::LeafTerm>

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.

Implementors§

Source§

impl<'db, T> BoundTerm<'db> for Binder<'db, T>
where T: BoundTerm<'db>,

Source§

impl<'db, T> BoundTerm<'db> for T
where T: LeafBoundTerm<'db>,

Source§

impl<'db, T: Subst<'db, Output = T>> BoundTerm<'db> for NeverBinder<T>