pub type Selection<'tcx> = ImplSource<'tcx, Obligation<'tcx, Predicate<'tcx>>>;
Aliased Type§
enum Selection<'tcx> {
UserDefined(ImplSourceUserDefinedData<'tcx, Obligation<'tcx, Predicate<'tcx>>>),
Param(ThinVec<Obligation<'tcx, Predicate<'tcx>>>),
Builtin(BuiltinImplSource, ThinVec<Obligation<'tcx, Predicate<'tcx>>>),
}
Variants§
UserDefined(ImplSourceUserDefinedData<'tcx, Obligation<'tcx, Predicate<'tcx>>>)
ImplSource identifying a particular impl.
Param(ThinVec<Obligation<'tcx, Predicate<'tcx>>>)
Successful resolution to an obligation provided by the caller
for some type parameter. The Vec<N>
represents the
obligations incurred from normalizing the where-clause (if
any).
Builtin(BuiltinImplSource, ThinVec<Obligation<'tcx, Predicate<'tcx>>>)
Successful resolution for a builtin impl.
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
UserDefined
: 24 bytesParam
: 8 bytesBuiltin
: 24 bytes
Implementations
Source§impl<'tcx, N> ImplSource<'tcx, N>
impl<'tcx, N> ImplSource<'tcx, N>
pub fn nested_obligations(self) -> ThinVec<N>
pub fn borrow_nested_obligations(&self) -> &[N]
pub fn borrow_nested_obligations_mut(&mut self) -> &mut [N]
pub fn map<M, F>(self, f: F) -> ImplSource<'tcx, M>where
F: FnMut(N) -> M,
Trait Implementations
Source§impl<'tcx, N> Clone for ImplSource<'tcx, N>where
N: Clone,
impl<'tcx, N> Clone for ImplSource<'tcx, N>where
N: Clone,
Source§fn clone(&self) -> ImplSource<'tcx, N>
fn clone(&self) -> ImplSource<'tcx, N>
Returns a copy 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<'tcx, N> Debug for ImplSource<'tcx, N>where
N: Debug,
impl<'tcx, N> Debug for ImplSource<'tcx, N>where
N: Debug,
Source§impl<'tcx, N, __D> Decodable<__D> for ImplSource<'tcx, N>
impl<'tcx, N, __D> Decodable<__D> for ImplSource<'tcx, N>
fn decode(__decoder: &mut __D) -> ImplSource<'tcx, N>
Source§impl<'tcx, N, __E> Encodable<__E> for ImplSource<'tcx, N>
impl<'tcx, N, __E> Encodable<__E> for ImplSource<'tcx, N>
Source§impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSource<'tcx, N>where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSource<'tcx, N>where
N: HashStable<StableHashingContext<'__ctx>>,
fn hash_stable( &self, __hcx: &mut StableHashingContext<'__ctx>, __hasher: &mut StableHasher<SipHasher128>, )
Source§impl<'tcx, N> PartialEq for ImplSource<'tcx, N>where
N: PartialEq,
impl<'tcx, N> PartialEq for ImplSource<'tcx, N>where
N: PartialEq,
Source§impl<'tcx, N> TypeFoldable<TyCtxt<'tcx>> for ImplSource<'tcx, N>where
N: TypeFoldable<TyCtxt<'tcx>>,
impl<'tcx, N> TypeFoldable<TyCtxt<'tcx>> for ImplSource<'tcx, N>where
N: TypeFoldable<TyCtxt<'tcx>>,
Source§fn try_fold_with<__F>(
self,
__folder: &mut __F,
) -> Result<ImplSource<'tcx, N>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>where
__F: FallibleTypeFolder<TyCtxt<'tcx>>,
fn try_fold_with<__F>(
self,
__folder: &mut __F,
) -> Result<ImplSource<'tcx, N>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>where
__F: FallibleTypeFolder<TyCtxt<'tcx>>,
Source§fn fold_with<F>(self, folder: &mut F) -> Selfwhere
F: TypeFolder<I>,
fn fold_with<F>(self, folder: &mut F) -> Selfwhere
F: TypeFolder<I>,
A convenient alternative to
try_fold_with
for use with infallible
folders. Do not override this method, to ensure coherence with
try_fold_with
.