pub struct DynBinder<'tcx, T> {
pub existential_ty: ParamTy,
pub predicates: GenericPredicates<'tcx>,
pub val: T,
}Expand description
A representation of exists<T: Trait1 + Trait2>(value): we create a fresh type id and the
appropriate trait clauses. The contained value may refer to the fresh ty and the in-scope trait
clauses. This is used to represent types related to dyn Trait.
Fields§
§existential_ty: ParamTyFresh type parameter that we use as the Self type in the predicates below.
predicates: GenericPredicates<'tcx>Clauses that define the trait object. These clauses use the fresh type parameter above
as Self type.
val: TThe value inside the binder.
Trait Implementations§
impl<'tcx, T: Eq> Eq for DynBinder<'tcx, T>
Source§impl<'tcx, S, T, U> SInto<S, DynBinder<'tcx, U>> for DynBinder<'tcx, T, DefId>where
S: UnderOwnerState<'tcx>,
T: SInto<S, U>,
impl<'tcx, S, T, U> SInto<S, DynBinder<'tcx, U>> for DynBinder<'tcx, T, DefId>where
S: UnderOwnerState<'tcx>,
T: SInto<S, U>,
impl<'tcx, T: PartialEq> StructuralPartialEq for DynBinder<'tcx, T>
Auto Trait Implementations§
impl<'tcx, T> DynSend for DynBinder<'tcx, T>where
T: DynSend,
impl<'tcx, T> DynSync for DynBinder<'tcx, T>where
T: DynSync,
impl<'tcx, T> Freeze for DynBinder<'tcx, T>where
T: Freeze,
impl<'tcx, T> RefUnwindSafe for DynBinder<'tcx, T>where
T: RefUnwindSafe,
impl<'tcx, T> Send for DynBinder<'tcx, T>where
T: Send,
impl<'tcx, T> Sync for DynBinder<'tcx, T>where
T: Sync,
impl<'tcx, T> Unpin for DynBinder<'tcx, T>where
T: Unpin,
impl<'tcx, T> UnsafeUnpin for DynBinder<'tcx, T>where
T: UnsafeUnpin,
impl<'tcx, T> UnwindSafe for DynBinder<'tcx, 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<T> Dedup for T
§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<T> HashConsable 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> ⓘ
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