pub struct Fn<'tcx> {
def_id: DefId,
args: Option<GenericArgsRef<'tcx>>,
rustc_sig: PolyFnSig<'tcx>,
param_env: ParamEnv<'tcx>,
inline: InlineAttr,
sig: PolyFnSig<'tcx>,
fn_trait_impls: OnceCell<Option<FnTraitImpls<'tcx>>>,
}Fields§
§def_id: DefId§args: Option<GenericArgsRef<'tcx>>§rustc_sig: PolyFnSig<'tcx>The signature, instantiated with args if relevant.
param_env: ParamEnv<'tcx>§inline: InlineAttr§sig: PolyFnSig<'tcx>§fn_trait_impls: OnceCell<Option<FnTraitImpls<'tcx>>>Computed on demand, see Fn::fn_trait_impls.
Implementations§
Source§impl<'tcx> Fn<'tcx>
impl<'tcx> Fn<'tcx>
pub fn param_env(&self) -> &ParamEnv<'tcx>
pub fn inline(&self) -> &InlineAttr
pub fn sig(&self) -> &PolyFnSig<'tcx>
Sourcepub fn fn_trait_impls(
&self,
s: &impl BaseState<'tcx>,
) -> Option<&FnTraitImpls<'tcx>>
pub fn fn_trait_impls( &self, s: &impl BaseState<'tcx>, ) -> Option<&FnTraitImpls<'tcx>>
The virtual Fn* impls for this function, if it is Fn*-compatible.
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !DynSync for Fn<'tcx>
impl<'tcx> !Freeze for Fn<'tcx>
impl<'tcx> !RefUnwindSafe for Fn<'tcx>
impl<'tcx> !Sync for Fn<'tcx>
impl<'tcx> !UnwindSafe for Fn<'tcx>
impl<'tcx> DynSend for Fn<'tcx>
impl<'tcx> Send for Fn<'tcx>
impl<'tcx> Unpin for Fn<'tcx>
impl<'tcx> UnsafeUnpin for Fn<'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