pub struct ClosureTy<'tcx> {
pub item: ItemRef<'tcx>,
}Expand description
Reflects [ty::ClosureArgs]
Fields§
§item: ItemRef<'tcx>Implementations§
Source§impl<'tcx> ClosureTy<'tcx>
impl<'tcx> ClosureTy<'tcx>
Sourcepub fn kind(&self, s: &impl BaseState<'tcx>) -> ClosureKind
pub fn kind(&self, s: &impl BaseState<'tcx>) -> ClosureKind
The base kind of this closure. The kinds are ordered by inclusion: any Fn works as an
FnMut, and any FnMut works as an FnOnce.
Sourcepub fn fn_sig(&self, s: &impl BaseState<'tcx>) -> PolyFnSig<'tcx>
pub fn fn_sig(&self, s: &impl BaseState<'tcx>) -> PolyFnSig<'tcx>
The signature of the function that this closure implements, e.g. fn(A, B, C) -> D.
pub fn sfrom<S>(s: &S, def_id: RDefId, from: GenericArgsRef<'tcx>) -> Selfwhere
S: UnderOwnerState<'tcx>,
Trait Implementations§
impl<'tcx> Eq for ClosureTy<'tcx>
impl<'tcx> StructuralPartialEq for ClosureTy<'tcx>
Auto Trait Implementations§
impl<'tcx> DynSend for ClosureTy<'tcx>
impl<'tcx> DynSync for ClosureTy<'tcx>
impl<'tcx> Freeze for ClosureTy<'tcx>
impl<'tcx> RefUnwindSafe for ClosureTy<'tcx>
impl<'tcx> Send for ClosureTy<'tcx>
impl<'tcx> Sync for ClosureTy<'tcx>
impl<'tcx> Unpin for ClosureTy<'tcx>
impl<'tcx> UnsafeUnpin for ClosureTy<'tcx>
impl<'tcx> UnwindSafe for ClosureTy<'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> 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