Struct rustc_type_ir::OptWithInfcx
source · pub struct OptWithInfcx<'a, I: Interner, InfCtx: InferCtxtLike<I>, T> {
pub data: T,
pub infcx: Option<&'a InfCtx>,
_interner: PhantomData<I>,
}
Fields§
§data: T
§infcx: Option<&'a InfCtx>
§_interner: PhantomData<I>
Implementations§
source§impl<'a, I: Interner, T> OptWithInfcx<'a, I, Infallible, T>
impl<'a, I: Interner, T> OptWithInfcx<'a, I, Infallible, T>
pub fn new_no_ctx(data: T) -> Self
source§impl<'a, I: Interner, InfCtx: InferCtxtLike<I>, T> OptWithInfcx<'a, I, InfCtx, T>
impl<'a, I: Interner, InfCtx: InferCtxtLike<I>, T> OptWithInfcx<'a, I, InfCtx, T>
pub fn new(data: T, infcx: &'a InfCtx) -> Self
pub fn wrap<U>(self, u: U) -> OptWithInfcx<'a, I, InfCtx, U>
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> OptWithInfcx<'a, I, InfCtx, U>
pub fn as_ref(&self) -> OptWithInfcx<'a, I, InfCtx, &T>
Trait Implementations§
source§impl<I: Interner, InfCtx: InferCtxtLike<I>, T: Clone> Clone for OptWithInfcx<'_, I, InfCtx, T>
impl<I: Interner, InfCtx: InferCtxtLike<I>, T: Clone> Clone for OptWithInfcx<'_, I, InfCtx, T>
source§impl<I: Interner, InfCtx: InferCtxtLike<I>, T: DebugWithInfcx<I>> Debug for OptWithInfcx<'_, I, InfCtx, T>
impl<I: Interner, InfCtx: InferCtxtLike<I>, T: DebugWithInfcx<I>> Debug for OptWithInfcx<'_, I, InfCtx, T>
impl<I: Interner, InfCtx: InferCtxtLike<I>, T: Copy> Copy for OptWithInfcx<'_, I, InfCtx, T>
Auto Trait Implementations§
impl<'a, I, InfCtx, T> RefUnwindSafe for OptWithInfcx<'a, I, InfCtx, T>where I: RefUnwindSafe, InfCtx: RefUnwindSafe, T: RefUnwindSafe,
impl<'a, I, InfCtx, T> Send for OptWithInfcx<'a, I, InfCtx, T>where I: Send, InfCtx: Sync, T: Send,
impl<'a, I, InfCtx, T> Sync for OptWithInfcx<'a, I, InfCtx, T>where I: Sync, InfCtx: Sync, T: Sync,
impl<'a, I, InfCtx, T> Unpin for OptWithInfcx<'a, I, InfCtx, T>where I: Unpin, T: Unpin,
impl<'a, I, InfCtx, T> UnwindSafe for OptWithInfcx<'a, I, InfCtx, T>where I: UnwindSafe, InfCtx: RefUnwindSafe, 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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.