pub struct NeverBinder<T> {
_data: Never,
_value: T,
}Fields§
§_data: Never§_value: TTrait Implementations§
Source§impl<'db, T: Subst<'db, Output = T>> BoundTerm<'db> for NeverBinder<T>
impl<'db, T: Subst<'db, Output = T>> BoundTerm<'db> for NeverBinder<T>
const BINDER_LEVELS: usize = 0
type BoundTerm = NeverBinder<T>
type LeafTerm = T
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>
Source§impl<T: Clone> Clone for NeverBinder<T>
impl<T: Clone> Clone for NeverBinder<T>
Source§fn clone(&self) -> NeverBinder<T>
fn clone(&self) -> NeverBinder<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for NeverBinder<T>
impl<T: Debug> Debug for NeverBinder<T>
Source§impl<T: Hash> Hash for NeverBinder<T>
impl<T: Hash> Hash for NeverBinder<T>
Source§impl<T: Ord> Ord for NeverBinder<T>
impl<T: Ord> Ord for NeverBinder<T>
Source§fn cmp(&self, other: &NeverBinder<T>) -> Ordering
fn cmp(&self, other: &NeverBinder<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for NeverBinder<T>
impl<T: PartialEq> PartialEq for NeverBinder<T>
Source§impl<T: PartialOrd> PartialOrd for NeverBinder<T>
impl<T: PartialOrd> PartialOrd for NeverBinder<T>
Source§impl<'db, T> Subst<'db> for NeverBinder<T>where
T: Debug,
impl<'db, T> Subst<'db> for NeverBinder<T>where
T: Debug,
Source§type GenericTerm = SymGenericTerm<'db>
type GenericTerm = SymGenericTerm<'db>
The notion of generic term appropriate for this type.
When we substitute variables, this is the type of value that we replace them with.
Source§fn subst_vars(
&self,
db: &'db dyn Db,
map: &Map<SymVariable<'db>, Self::GenericTerm>,
) -> Self::Output
fn subst_vars( &self, db: &'db dyn Db, map: &Map<SymVariable<'db>, Self::GenericTerm>, ) -> Self::Output
Returns a version of
self where universal free variables
have been replaced by the corresponding entry in terms.
If a variable is not present in terms it is not substituted.Source§fn subst_var(
&self,
db: &'db dyn Db,
var: SymVariable<'db>,
term: Self::GenericTerm,
) -> Self::Output
fn subst_var( &self, db: &'db dyn Db, var: SymVariable<'db>, term: Self::GenericTerm, ) -> Self::Output
Replace the variable
var with term.Source§fn resolve_infer_var(
&self,
db: &'db dyn Db,
bound_vars: &mut Vec<SymVariable<'db>>,
op: impl FnMut(InferVarIndex) -> Option<Self::GenericTerm>,
) -> Self::Output
fn resolve_infer_var( &self, db: &'db dyn Db, bound_vars: &mut Vec<SymVariable<'db>>, op: impl FnMut(InferVarIndex) -> Option<Self::GenericTerm>, ) -> Self::Output
Replace all inference variables with whatever is returned by
op;
if op returns None, the inference variable is left unchanged.Source§impl<'db, T, Term> SubstWith<'db, Term> for NeverBinder<T>
impl<'db, T, Term> SubstWith<'db, Term> for NeverBinder<T>
Source§type Output = NeverBinder<T>
type Output = NeverBinder<T>
The type of the resulting term; typically
Self but not always.Source§fn subst_with<'subst>(
&'subst self,
_db: &'db dyn Db,
_bound_vars: &mut Vec<SymVariable<'db>>,
_subst_fns: &mut SubstitutionFns<'_, 'db, Term>,
) -> Self::Output
fn subst_with<'subst>( &'subst self, _db: &'db dyn Db, _bound_vars: &mut Vec<SymVariable<'db>>, _subst_fns: &mut SubstitutionFns<'_, 'db, Term>, ) -> Self::Output
Source§impl<T> Update for NeverBinder<T>
impl<T> Update for NeverBinder<T>
impl<T: Copy> Copy for NeverBinder<T>
impl<T: Eq> Eq for NeverBinder<T>
impl<T> StructuralPartialEq for NeverBinder<T>
Auto Trait Implementations§
impl<T> Freeze for NeverBinder<T>where
T: Freeze,
impl<T> RefUnwindSafe for NeverBinder<T>where
T: RefUnwindSafe,
impl<T> Send for NeverBinder<T>where
T: Send,
impl<T> Sync for NeverBinder<T>where
T: Sync,
impl<T> Unpin for NeverBinder<T>where
T: Unpin,
impl<T> UnsafeUnpin for NeverBinder<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for NeverBinder<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> HashEqLike<T> for T
impl<T> HashEqLike<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more