pub struct AssocFn<'tcx> {
param_env: ParamEnv<'tcx>,
associated_item: AssocItem<'tcx>,
rustc_sig: PolyFnSig<'tcx>,
sig: PolyFnSig<'tcx>,
inline: InlineAttr,
}Expand description
Associated function: impl MyStruct { fn associated() {} } or trait Foo { fn associated() {} }
Fields§
§param_env: ParamEnv<'tcx>§associated_item: AssocItem<'tcx>§rustc_sig: PolyFnSig<'tcx>The signature, instantiated with the item’s arguments if relevant.
sig: PolyFnSig<'tcx>§inline: InlineAttrImplementations§
Source§impl<'tcx> AssocFn<'tcx>
impl<'tcx> AssocFn<'tcx>
pub fn param_env(&self) -> &ParamEnv<'tcx>
pub fn sig(&self) -> &PolyFnSig<'tcx>
pub fn associated_item(&self) -> &AssocItem<'tcx>
pub fn inline(&self) -> &InlineAttr
Sourcepub fn vtable_sig(&self, s: &impl BaseState<'tcx>) -> Option<PolyFnSig<'tcx>>
pub fn vtable_sig(&self, s: &impl BaseState<'tcx>) -> Option<PolyFnSig<'tcx>>
The function signature when this method is used in a vtable. None if this method is not
vtable safe. Some(sig) if it is vtable safe, where sig is the trait method declaration’s
signature with Self replaced by dyn Trait and associated types normalized.
Sourcepub fn vtable_receiver_path(&self, s: &impl BaseState<'tcx>) -> Vec<FieldIdx>
pub fn vtable_receiver_path(&self, s: &impl BaseState<'tcx>) -> Vec<FieldIdx>
For a vtable-safe method, the fields to follow from its vtable receiver to the built-in pointer that carries the vtable.
Sourcepub fn vtable_receiver_is_by_value(&self, s: &impl BaseState<'tcx>) -> bool
pub fn vtable_receiver_is_by_value(&self, s: &impl BaseState<'tcx>) -> bool
Whether the trait method declaration takes self: Self by value.
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for AssocFn<'tcx>
impl<'tcx> !UnwindSafe for AssocFn<'tcx>
impl<'tcx> DynSend for AssocFn<'tcx>
impl<'tcx> DynSync for AssocFn<'tcx>
impl<'tcx> Forget for AssocFn<'tcx>
impl<'tcx> Freeze for AssocFn<'tcx>
impl<'tcx> Move for AssocFn<'tcx>
impl<'tcx> Send for AssocFn<'tcx>
impl<'tcx> Sync for AssocFn<'tcx>
impl<'tcx> Unpin for AssocFn<'tcx>
impl<'tcx> UnsafeUnpin for AssocFn<'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> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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