pub struct AssocTy<'tcx> {
def_id: DefId,
args: Option<GenericArgsRef<'tcx>>,
param_env: ParamEnv<'tcx>,
implied_predicates: GenericPredicates<'tcx>,
associated_item: AssocItem<'tcx>,
}Expand description
Associated type: trait MyTrait { type Assoc; }
Fields§
§def_id: DefId§args: Option<GenericArgsRef<'tcx>>§param_env: ParamEnv<'tcx>§implied_predicates: GenericPredicates<'tcx>§associated_item: AssocItem<'tcx>Implementations§
Source§impl<'tcx> AssocTy<'tcx>
impl<'tcx> AssocTy<'tcx>
pub fn param_env(&self) -> &ParamEnv<'tcx>
pub fn implied_predicates(&self) -> &GenericPredicates<'tcx>
pub fn associated_item(&self) -> &AssocItem<'tcx>
Sourcepub fn value(
&self,
s: &impl BaseState<'tcx>,
) -> Option<(Ty<'tcx>, Vec<TraitProof<'tcx>>)>
pub fn value( &self, s: &impl BaseState<'tcx>, ) -> Option<(Ty<'tcx>, Vec<TraitProof<'tcx>>)>
The value for this associated type, along with proofs of the required predicates. If we’re in a trait decl, this has a value iff the type has a default; if we’re in a trait impl, this has a value iff the impl provides its own value for it.
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for AssocTy<'tcx>
impl<'tcx> !UnwindSafe for AssocTy<'tcx>
impl<'tcx> DynSend for AssocTy<'tcx>
impl<'tcx> DynSync for AssocTy<'tcx>
impl<'tcx> Freeze for AssocTy<'tcx>
impl<'tcx> Send for AssocTy<'tcx>
impl<'tcx> Sync for AssocTy<'tcx>
impl<'tcx> Unpin for AssocTy<'tcx>
impl<'tcx> UnsafeUnpin for AssocTy<'tcx>
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> 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