pub enum CallingConvention<'tcx> {
Direct(Box<[Spanned<Operand<'tcx>>]>),
Indirect {
shim: Option<ShimType>,
closure_arg: Spanned<Operand<'tcx>>,
tupled_arguments: Spanned<Operand<'tcx>>,
},
Async(Place<'tcx>),
}
Expand description
Describes how the formal parameters of a given function call relate to the actual parameters.
Variants§
Direct(Box<[Spanned<Operand<'tcx>>]>)
1 to 1 mapping
Indirect
First argument is the closed-over environment, second argument is a tuple that contains the actual argument to the call of the closure function.
Fields
Async(Place<'tcx>)
An async generator, only has one argument which is the generator state.
Implementations§
Source§impl<'tcx> CallingConvention<'tcx>
impl<'tcx> CallingConvention<'tcx>
pub fn from_call_kind( kind: &CallKind<'tcx>, args: Cow<'_, [Spanned<Operand<'tcx>>]>, ) -> CallingConvention<'tcx>
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> Freeze for CallingConvention<'tcx>
impl<'tcx> !RefUnwindSafe for CallingConvention<'tcx>
impl<'tcx> Send for CallingConvention<'tcx>
impl<'tcx> Sync for CallingConvention<'tcx>
impl<'tcx> Unpin for CallingConvention<'tcx>
impl<'tcx> !UnwindSafe for CallingConvention<'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> 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